Commit fef8a8a
authored
fix(visual): stop silently dropping mobile screenshots of long pages (#9790)
MAX_SCREENSHOT_HEIGHT was 10000, derived for the 1440-wide DESKTOP viewport --
MAX_SCREENSHOT_PIXELS is literally 1440 x 10000. Reusing that height bound for the
390-wide MOBILE viewport rejected captures costing a third as much: an ordinary
long docs page renders ~10850px tall at 390 wide, which is 4.2M pixels against a
14.4M budget. The shot was discarded and the function returned null.
On the ORB that was 64 mobile screenshots dropped in a single hour, weakening the
visual gate on exactly the viewport most likely to show a responsive regression.
The renderer was never the constraint. Verified against this deployment's own
browserless (v2 / Chrome 149): a 390 x 20000 full-page capture returns 200 in
~157KB. Raise the height bound to 20000 and let MAX_SCREENSHOT_PIXELS remain the
real cost ceiling, which judges a narrow-tall page by what it actually costs.
Desktop is unchanged: 1440 x 10847 is 15.6M pixels and still fails the pixel cap.1 parent c368d7e commit fef8a8a
2 files changed
Lines changed: 47 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
73 | 88 | | |
74 | 89 | | |
75 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
1113 | 1113 | | |
1114 | 1114 | | |
1115 | 1115 | | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
0 commit comments