Repository navigation
Move Prompt Cache Timer setting to Agents pane, simplify expired state - #5691
Conversation
The prompt cache countdown is a functional cost-awareness control tied to how Claude agents run, not a general app preference. Move it out of the cluttered General pane into Agents, next to the idle-related "keep agent awake" setting, where users look for agent behavior/cost config. Also drop the redundant "expired" text on the sidebar timer — the red icon already conveys the state, and the countdown text is only meaningful while the cache is alive. The tooltip still carries the full explanation. Renames GeneralCacheTimerSection -> AgentCacheTimerSection (component and its i18n key path across all 5 locales) and moves its search entry into a dedicated agent-cache-timer-search module wired into the Agents pane search. Co-authored-by: Orca <[email protected]>
|
Ready to review this PR? Stage has broken it down into 4 individual chapters for you:
Chapters generated by Stage for commit a9bb715 on Jun 18, 2026 9:22am UTC. |
📝 WalkthroughWalkthroughThe Prompt Cache Timer setting is moved from the General settings pane to the Agents settings pane. A new 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The General pane's Project Runtime section ("Default runtime for local
Windows projects...") rendered its header on macOS/Linux even with no
Windows runtime, leaving a title and description with no control beneath
it (the inner DefaultWindowsProjectRuntimeSetting self-hides).
Cause: the render guard relied on matchesSettingsSearch, which returns
true for an empty search query regardless of the (empty) entries array,
so the platform gate was effectively bypassed when not searching.
Gate the section on wslSupportedPlatform directly via a new
shouldShowProjectRuntimeSection helper, and add regression tests covering
the empty-query case on non-Windows hosts.
Co-authored-by: Orca <[email protected]>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/components/settings/GeneralPane.test.ts (1)
168-186: 💤 Low valueConsider using
getGeneralProjectRuntimeSearchEntries()for more precise tests.The test currently uses
getGeneralPaneSearchEntries()(all entries), while the component passesgetGeneralProjectRuntimeSearchEntries()(only runtime entries). The test still validates the behavior correctly since earlier tests verify the keyword inclusion, but using the specific runtime entries would more closely mirror production usage and catch regressions if those entries were accidentally modified.describe('GeneralPane project runtime section visibility', () => { - const entries = getGeneralPaneSearchEntries() + // Use the same entries the component passes to shouldShowProjectRuntimeSection + const entries = getGeneralProjectRuntimeSearchEntries()This would require importing
getGeneralProjectRuntimeSearchEntriesfrom./general-search.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 589badde-52c6-47d9-a990-6a7ea5dc8347
📒 Files selected for processing (2)
src/renderer/src/components/settings/GeneralPane.test.tssrc/renderer/src/components/settings/GeneralPane.tsx
The Network/proxy settings sat in General as two always-visible input boxes with help text — heavy visual weight for a low-level setting most users never touch. Move them to the Advanced pane (alongside HTTP/1.1 Compatibility, same corporate-VPN/proxy audience) under a new Network subsection, and collapse the inputs behind a single "Configure proxy" disclosure. The fields auto-expand when a proxy is already configured or when a proxy-related settings search matches, so a set value is never hidden. Renames GeneralNetworkSettingsSection -> AdvancedNetworkSettingsSection (component + i18n key path across all 5 locales), moves its search entries into a dedicated advanced-network-search module wired into the Advanced pane search, and relocates the proxy-draft tests accordingly. Co-authored-by: Orca <[email protected]>
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
* upstream/main: (220 commits) Show and Filter Automation-Created Workspaces (stablyai#5697) Fix premature project header truncation Send review notes to any running agent of a worktree (stablyai#5654) Fix workspace sidebar appearance setting (stablyai#5725) Highlight the open file in the Source Control sidebar (stablyai#5667) release: v1.4.80-rc.1 Fix premature Codex completion notifications (stablyai#5682) Improve Codex startup prompt reliability (stablyai#5686) Keep hibernated agent completions visible (stablyai#5689) Move Prompt Cache Timer setting to Agents pane, simplify expired state (stablyai#5691) release: v1.4.80-rc.0 Skip GitHub CLI preflight checks if no GitHub projects exist fix: restore font family keyboard navigation in settings Update README downloads badge fix(landing): make GitHub CLI setup nudge dismissible and provider-aware (stablyai#5688) Fix nested workspace card indentation (stablyai#5684) Fix flaky e2e tests (stablyai#5680) Replace plus icon with play button on quick command entry (stablyai#5674) Use managed Pi and OMP extensions (stablyai#5681) Narrow computer-use e2e trigger (stablyai#5685) ... # Conflicts: # mobile/src/terminal/TerminalWebView.tsx # mobile/src/terminal/terminal-webview-text-zoom.test.ts
* upstream/main: (78 commits) Show and Filter Automation-Created Workspaces (stablyai#5697) Fix premature project header truncation Send review notes to any running agent of a worktree (stablyai#5654) Fix workspace sidebar appearance setting (stablyai#5725) Highlight the open file in the Source Control sidebar (stablyai#5667) release: v1.4.80-rc.1 Fix premature Codex completion notifications (stablyai#5682) Improve Codex startup prompt reliability (stablyai#5686) Keep hibernated agent completions visible (stablyai#5689) Move Prompt Cache Timer setting to Agents pane, simplify expired state (stablyai#5691) release: v1.4.80-rc.0 Skip GitHub CLI preflight checks if no GitHub projects exist fix: restore font family keyboard navigation in settings Update README downloads badge fix(landing): make GitHub CLI setup nudge dismissible and provider-aware (stablyai#5688) Fix nested workspace card indentation (stablyai#5684) Fix flaky e2e tests (stablyai#5680) Replace plus icon with play button on quick command entry (stablyai#5674) Use managed Pi and OMP extensions (stablyai#5681) Narrow computer-use e2e trigger (stablyai#5685) ... # Conflicts: # mobile/app/h/[hostId]/session/[worktreeId].tsx # mobile/src/terminal/TerminalWebView.tsx # mobile/src/terminal/terminal-webview-html.ts
* upstream/main: (220 commits) Show and Filter Automation-Created Workspaces (stablyai#5697) Fix premature project header truncation Send review notes to any running agent of a worktree (stablyai#5654) Fix workspace sidebar appearance setting (stablyai#5725) Highlight the open file in the Source Control sidebar (stablyai#5667) release: v1.4.80-rc.1 Fix premature Codex completion notifications (stablyai#5682) Improve Codex startup prompt reliability (stablyai#5686) Keep hibernated agent completions visible (stablyai#5689) Move Prompt Cache Timer setting to Agents pane, simplify expired state (stablyai#5691) release: v1.4.80-rc.0 Skip GitHub CLI preflight checks if no GitHub projects exist fix: restore font family keyboard navigation in settings Update README downloads badge fix(landing): make GitHub CLI setup nudge dismissible and provider-aware (stablyai#5688) Fix nested workspace card indentation (stablyai#5684) Fix flaky e2e tests (stablyai#5680) Replace plus icon with play button on quick command entry (stablyai#5674) Use managed Pi and OMP extensions (stablyai#5681) Narrow computer-use e2e trigger (stablyai#5685) ... # Conflicts: # src/renderer/src/i18n/locales/en.json # src/renderer/src/i18n/locales/es.json # src/renderer/src/i18n/locales/ja.json # src/renderer/src/i18n/locales/ko.json # src/renderer/src/i18n/locales/zh.json
* upstream/main: (341 commits) Show and Filter Automation-Created Workspaces (stablyai#5697) Fix premature project header truncation Send review notes to any running agent of a worktree (stablyai#5654) Fix workspace sidebar appearance setting (stablyai#5725) Highlight the open file in the Source Control sidebar (stablyai#5667) release: v1.4.80-rc.1 Fix premature Codex completion notifications (stablyai#5682) Improve Codex startup prompt reliability (stablyai#5686) Keep hibernated agent completions visible (stablyai#5689) Move Prompt Cache Timer setting to Agents pane, simplify expired state (stablyai#5691) release: v1.4.80-rc.0 Skip GitHub CLI preflight checks if no GitHub projects exist fix: restore font family keyboard navigation in settings Update README downloads badge fix(landing): make GitHub CLI setup nudge dismissible and provider-aware (stablyai#5688) Fix nested workspace card indentation (stablyai#5684) Fix flaky e2e tests (stablyai#5680) Replace plus icon with play button on quick command entry (stablyai#5674) Use managed Pi and OMP extensions (stablyai#5681) Narrow computer-use e2e trigger (stablyai#5685) ... # Conflicts: # src/main/text-generation/commit-message-text-generation.test.ts # src/main/text-generation/commit-message-text-generation.ts
What
The prompt cache hit timer is the per-worktree countdown that warns you before your Claude agent's prompt cache expires (so you don't unknowingly send an expensive, fully-uncached message). It currently lives under Settings → General, which is the wrong home, and the sidebar timer shows a redundant
expiredlabel.This PR:
expiredtext on the sidebar timer, keeping just the red timer icon. The color already conveys the expired state; the countdown text is only meaningful while the cache is alive. The tooltip still carries the full "next message re-sends full context as uncached tokens" explanation on hover.How
GeneralCacheTimerSection→AgentCacheTimerSection(component + i18n key path across all 5 locales).agent-cache-timer-searchmodule, wired into the Agents pane search (so "prompt cache" / "ttl" / "cost" lands in Agents now); removed fromgeneral-search.AgentsPaneafterAgentAwakeSetting; remove fromGeneralPane.CacheTimer.tsx.Testing
tsgoweb typecheck: cleanverify:localization-catalog: all 8862 key references resolve, all 5 locales at parityNotes
en.jsonrather than deriving keys from filenames.Made with Orca 🐋
Additional fix: orphaned Project Runtime header on non-Windows hosts
Found while validating the above in the running app. The General pane's Project Runtime section ("Default runtime for local Windows projects…") rendered its header on macOS/Linux even with no Windows runtime connected, leaving a title + description with no control beneath it.
Cause: the section's render guard relied solely on
matchesSettingsSearch, which returnstruefor an empty search query regardless of the (conditionally empty) entries array — so the platform gate was effectively bypassed when not searching. The innerDefaultWindowsProjectRuntimeSettingself-hides viawslSupportedPlatform, hence the orphaned header.Fix: gate the section on
wslSupportedPlatformdirectly via a newshouldShowProjectRuntimeSectionhelper; added regression tests for the empty-query case on non-Windows hosts.Verified live via CDP on the running dev build: backing data was correct (
hostPlatform: darwin, no active runtime env, 0 hosts), and after the fix the orphaned section is gone from the General pane DOM.Additional change: proxy settings → Advanced, progressive disclosure
The Network/proxy settings sat in General as two always-visible input boxes with help text — heavy visual weight for a low-level setting most users never touch.
Change: moved them to the Advanced pane (alongside HTTP/1.1 Compatibility — same corporate-VPN/proxy audience) under a new Network subsection, and collapsed the inputs behind a single "Configure proxy" disclosure. The fields auto-expand when a proxy is already configured or when a proxy-related settings search matches, so a set value is never hidden behind the collapse.
Renames
GeneralNetworkSettingsSection→AdvancedNetworkSettingsSection(component + i18n key path across all 5 locales), moves its search entries into a dedicatedadvanced-network-searchmodule wired into the Advanced pane search, and relocates the proxy-draft tests.Verified live via CDP: General no longer shows the proxy boxes; Advanced shows the Network subsection with the collapsed "Configure proxy" trigger, which expands both fields on click.