refactor: remove unused withTransparentBackground theme helper#511
Conversation
After #510 switched the interactive TUI to withTransparentSurfaces, the fully-transparent helper had no production callers left. Remove it and rewrite the pierre word-diff test to build transparent tints inline, since custom themes can still declare "transparent" colors that the renderer must keep out of blend math. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Greptile SummaryThis PR removes the dead
Confidence Score: 5/5Safe to merge — removes dead code with no remaining callers and no user-visible behavior change. The deleted helper had zero production callers after #510; grep confirms no remaining references anywhere. The pierre test now covers the same renderer guard with a more focused inline fixture. The JSDoc update is accurate. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[AppTheme] --> B[withTransparentSurfaces]
B --> C["Clears neutral surfaces\n(background, panel, panelAlt,\ncontextBg, contextContentBg, lineNumberBg)"]
C --> D["Keeps semantic tints\n(addedBg, removedBg,\naddedContentBg, removedContentBg)"]
D --> E[Interactive TUI]
D --> F[Static Pager Hosts]
G["withTransparentBackground\n(deleted)"] -.->|"was: clears ALL surfaces\nincluding semantic tints"| X["No callers remain"]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[AppTheme] --> B[withTransparentSurfaces]
B --> C["Clears neutral surfaces\n(background, panel, panelAlt,\ncontextBg, contextContentBg, lineNumberBg)"]
C --> D["Keeps semantic tints\n(addedBg, removedBg,\naddedContentBg, removedContentBg)"]
D --> E[Interactive TUI]
D --> F[Static Pager Hosts]
G["withTransparentBackground\n(deleted)"] -.->|"was: clears ALL surfaces\nincluding semantic tints"| X["No callers remain"]
Reviews (1): Last reviewed commit: "refactor: remove unused withTransparentB..." | Re-trigger Greptile |
What
Follow-up to #510. Once the interactive TUI switched to
withTransparentSurfaces,withTransparentBackgroundhad no production callers left — only its own unit test and one pierre renderer test. Per the repo rule of removing dead paths:withTransparentBackgroundfromsrc/ui/themes.tsand its dedicated unit test.withTransparentSurfacesJSDoc, which still claimed only static pager hosts used it.resolveWordDiffHighlightBgrefusing to blendtransparentvalues into black) is still live production behavior, because custom themes can declare"transparent"colors directly.Empty changeset — internal cleanup, no user-visible change.
🤖 Generated with Claude Code