oficina / sheets Public

Clone
git clone https://amadan.net/oficina/sheets

Plain git — no account needed to clone.

Download

Download this file

1# Browser menus and column auto-fit
2
3Requested by Paul, 2026-09-16: fix File → New sheet, audit other inert menu
4items, and support fitting one or several columns by double-clicking a divider.
5
6The New sheet form and server route were already wired. Reproduced with actual
7server-rendered markup/assets: Chromium submitted it, WebKit did not. WebKit
8blurs a menu summary without focusing the clicked button; the focusout handler
9closed the menu before click could activate the button. Keep that menu open
10when the pointer is activating an item inside it. Keyboard departures, Escape,
11and outside clicks continue to close it.
12
13The audit also found grid keyboard handling swallowing native menu activation,
14and menu arrow handling intercepting number-field stepping. Menu keys remain
15inside the menu; resize fields retain their native editing/submission behavior.
16
17Column auto-fit measures displayed content with each cell's rendered font,
18letter spacing, padding, and borders. It includes loaded rows below the viewport
19and header labels. A double-click on the existing right-edge resize handle fits
20that column, or each column in the current selection when it includes that
21handle. Format → Auto-fit columns provides the keyboard/menu equivalent.
22Widths are bounded by the existing 16–2000px server limits. Truncated sheets
23report that auto-fit measures only loaded grid contents. A failed write stops
24the remaining columns. Multi-column manual resizing now persists every column,
25with ordered requests rather than racing full-size-table responses.
26
27Validation:
28
29- `TestBrowserMenuFixture` exports a synthetic server-rendered page and its real
30 linked assets, without session cookies, for browser component checks.
31- `tools/drive/menu-actions.mjs` activates every menu link, form, command and
32 formatting choice in Chromium and WebKit against mocked transport. It also
33 checks keyboard submission, resize stepping, Escape and outside clicks.
34- `tools/drive/autofit.mjs` exercises fresh-grid double-click, selected headers,
35 offscreen formatted values, independent widths, persisted widths on reload,
36 manual group resizing, formula display values, bounds and failed-write retry.
37
38Source review: GPT-6 Astra, 2026-09-16; no remaining blocking findings after
39fixing fresh-grid divider fitting and matching the vendor's resize hit area.
40Deployed-canary review remains outstanding; these checks are component tests,
41not deployed-server approval.
42