Repository navigation
refactor: share the side pane block, the menu item helper and the sync author - #241
Merged
Merged
Conversation
…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).
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 |
Contributor
Author
|
Unchanged update after a merge of main (cross-review exemption).
|
bketelsen
approved these changes
Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Merges 3 duplicates that the grooming pass of #213 lists. No change in behavior.
app/src/app/MainWindow.tsx: the wide layout'ssidebar(side)and the narrow layout'sdrawerContent(side)each drew the same block: the header withPaneTabs, the selectedPane, and on the left theVaultRow. Now both callpaneStack(side, end?). The wide sidebar passes its header's spacer and, on the right, the window controls asend; 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:openFilesMenuhad its own copy ofmenus.ts'sitem(id, label, extra)helper and separator.menus.tsnow exportsitemandSEP, andfiles.tsximports 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.
make ui-check(nsl): exit 0, 96 files, 819 tests passed. Head:make ui-checkexit 0, 96 files, 819 tests passed;make ui-fmtapplied no fixes.make check(host,umask 022): exit 2, onlyinternal/vaultTestPrune(blob 5134638c kept = true, want false). Head: the same, and only that failure.TestPruneis a time bomb in the test that fails onmainsince 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 isok.go test -count=1 ./internal/syncerat the head: ok.TestPruneuntil test(vault): take the orphan blob's age in TestPrune from the test clock #240 merges; then this branch takes a merge ofmain.Left out on purpose
NARROWinapp/src/app/narrow.ts. Onlynarrow.test.tsximports it, so its removal would change an existing test.clix.OutputJSONchecks incmd/notesctl/: a helper would still need anifat each call site, so little would get simpler.ignoredandvaultPathHeld) or have their own issue (PruneChanges, changes log is never pruned: add a retention step that calls store.PruneChanges #219).