Skip to content

refactor(cmd): extract contextual-help catalog; fix misleading benchmark - #313

Merged
Patel230 merged 2 commits into
mainfrom
fix/help-data-bench
Sep 15, 2026
Merged

Patel230 merged 2 commits into
mainfrom
fix/help-data-bench

Conversation

@Patel230

Copy link
Copy Markdown
Contributor
  • Data-as-code: registerAllEntries (447 lines) is now a 7-line loop over a package-level builtinHelpEntries catalog.
  • Benchmark fix: BenchmarkIsSensitivePath used literal /home/... paths, which on macOS hit the autofs automounter and reported ~22ms/op. Realistic home/temp paths show ~130µs/op, so there is no real perf bug.

Verified: go vet, golangci-lint (0 issues), go test ./cmd/, gofumpt clean.

- registerAllEntries (447 lines) is now a 7-line loop over a package-level
  help-entry catalog.
- Fix BenchmarkIsSensitivePath: literal /home/... paths hit macOS autofs and
  measured ~22ms/op; realistic paths show ~130us/op.
ApplyTheme rewrites inputBorderStyle and minimalChrome; restoreThemeGlobals
only restored colors, so a tau palette swap leaked into layout tests and made
TestView_LineCountMatchesHeight order-dependent under -shuffle.
@Patel230
Patel230 merged commit eb63461 into main Sep 15, 2026
25 checks passed
@Patel230
Patel230 deleted the fix/help-data-bench branch September 15, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant