Skip to content

refactor: share the side pane block, the menu item helper and the sync author - #241

Merged
bketelsen merged 2 commits into
mainfrom
groom/shared-pane-menu-author
Nov 15, 2026
Merged

bketelsen merged 2 commits into
mainfrom
groom/shared-pane-menu-author

Conversation

@frostyard-machines

Copy link
Copy Markdown
Contributor

Summary

Merges 3 duplicates that the grooming pass of #213 lists. No change in behavior.

  • app/src/app/MainWindow.tsx: the wide layout's sidebar(side) and the narrow layout's drawerContent(side) each drew the same block: the header with PaneTabs, the selected Pane, and on the left the VaultRow. Now both call paneStack(side, end?). The wide sidebar passes its header's spacer and, on the right, the window controls as end; the drawer passes nothing. The DOM, classes, labels, props and handlers stay the same in both layouts.
  • app/src/app/menus.ts, app/src/app/panes/files.tsx: openFilesMenu had its own copy of menus.ts's item(id, label, extra) helper and separator. menus.ts now exports item and SEP, and files.tsx imports them. The menu entries stay the same.
  • internal/syncer/loop.go: vault.Author{Source: api.VersionSourceSync, Name: "sync"} was written out 5 times. syncAuthor() returns it (a function, not a package variable: no mutable package state).

Risk tier

Risk tier: 1 — a refactor with no change in behavior. No changed file is in .github/risk-paths.json.

Verification

No test changed or was added. The same tests pass before and after.

  • Base 6c33227, make ui-check (nsl): exit 0, 96 files, 819 tests passed. Head: make ui-check exit 0, 96 files, 819 tests passed; make ui-fmt applied no fixes.
  • Base 6c33227, make check (host, umask 022): exit 2, only internal/vault TestPrune (blob 5134638c kept = true, want false). Head: the same, and only that failure. TestPrune is a time bomb in the test that fails on main since 2026-11-15 09:30 UTC; test(vault): take the orphan blob's age in TestPrune from the test clock #240 fixes it. Tidy, gen-check, vet, gofmt and golangci-lint (0 issues) pass, and every other package is ok.
  • go test -count=1 ./internal/syncer at the head: ok.
  • Revert test: exempt (a refactor; the evidence is the same tests green before and after).
  • CI's Verify and Race detector jobs fail on TestPrune until test(vault): take the orphan blob's age in TestPrune from the test clock #240 merges; then this branch takes a merge of main.

Left out on purpose

…c author

- app/src/app/MainWindow.tsx: the wide sidebar and the narrow drawer drew
  the same pane tabs, pane and vault row; paneStack draws them for both.
- app/src/app/menus.ts, app/src/app/panes/files.tsx: the files pane's menu
  had its own copy of the item helper and the separator; it now imports
  them from menus.ts.
- internal/syncer/loop.go: the author of sync's own writes was written
  out 5 times; syncAuthor returns it.

No change in behavior (#213).
@github-actions github-actions Bot added the level:L3 Skim label Nov 15, 2026
@frostyard-machines

Copy link
Copy Markdown
Contributor Author

Cross-review (reviewer openai/gpt-6.1-sol; coder deepseek/deepseek-flash) at d0672e7, base 6c33227. First question: "Does any line of this diff change observable behavior?" Answer: none found. Ready, Blocking: none, no findings. The reviewer checked the DOM order, classes, props and handlers of both layouts, the menu entries, the import graph (files.tsx already reached menus.ts through commands.ts, so no new cycle), and the 5 syncAuthor() values.

@frostyard-machines

Copy link
Copy Markdown
Contributor Author

Unchanged update after a merge of main (cross-review exemption).

  • Reviewed head: d0672e7, old base: 6c33227.
  • New head: dbd8da2 (merge of origin/main), new base: e787095 (test(vault): take the orphan blob's age in TestPrune from the test clock #240). No conflicts, so no resolved hunks.
  • Comparison: git diff --no-ext-diff 6c33227 d0672e7 and git diff --no-ext-diff e787095 dbd8da2 are byte-identical (sha256 1484e5c9455f61df92cef533fe5634550268c527e4395cf58264afaa0a34c77b for both). The PR's own changes are unchanged.
  • Compatibility check (openai/gpt-6.1-sol, the reviewer of d0672e7): Compatible. Main changed only TestPrune in internal/vault/write_test.go; no API, default, dependency or assumption that the 4 refactored files use.
  • make check (host, umask 022) at dbd8da2: exit 0.

@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 15, 2026
@bketelsen
bketelsen merged commit 7f1b8d1 into main Nov 15, 2026
11 checks passed
@bketelsen
bketelsen deleted the groom/shared-pane-menu-author branch November 15, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:L3 Skim ready-for-human Reviewed, CI green: ready for Brian to review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants