Repository navigation
Conversation
…n settings The resolver falls back to terminalLinkActionPopoverEnabled for 'actions' so profiles that disabled the popover keep leave-to-terminal after the default merge adds terminalLinkClickBehavior: 'actions'. Drop the resolver early return and have the settings control re-enable the legacy flag instead. Fixes stablyai#25576
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughWhen Actions is selected for plain-click behavior, the setting update now also enables Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: 🟡 Moderate · up to New Actions selections now enable the popover, but users whose profiles already store Actions alongside a false legacy flag still get no action popover and see the setting as “Leave to terminal” until they reselect it. This is a bounded but unresolved gap in the behavior this PR targets. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
61005557-4d8b-41a8-aa9b-bce3b8ce6dba
📒 Files selected for processing (3)
src/main/persistence/loading-store/normalize-loaded-global-settings.test.tssrc/renderer/src/components/settings/BrowserTerminalLinkActionsSetting.test.tsxsrc/renderer/src/components/settings/BrowserTerminalLinkActionsSetting.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
ℹ️ No blocking issues — one rollout tradeoff and a couple of nits worth a look.
Reviewed changes
BrowserTerminalLinkActionsSetting.tsx— plain-clickonChangenow co-writesterminalLinkActionPopoverEnabled: truewhenactionsis chosen, so the control stops snapping back to "Leave to terminal". The resolver is deliberately left unchanged.BrowserTerminalLinkActionsSetting.test.tsx— new component test pinning the co-write, and asserting the other two choices leave the legacy flag alone. This test fails on the pre-fix write path, so it is real coverage.normalize-loaded-global-settings.test.ts— new integration test that a legacy popover-disabled profile still resolves tononeafter the default merge, plus a helper tweak that deletesundefinedoverrides so they model a key that was never stored.- Commit
ed468e1fdeadded anactionsearly return to the resolver; commitbe69f0a97freverted it in favor of the write-side fix.
I traced the design choice in the second commit and it holds: normalizeLoadedGlobalSettings spreads defaults.settings (which now carries terminalLinkClickBehavior: 'actions') before the persisted settings, so a legacy profile with no stored behavior arrives at the resolver as explicit 'actions'. A resolver early return would hand those profiles the popover back, so keeping the legacy flag consulted for 'actions' and fixing at the write site is the correct shape. The change also covers the native-chat path, which shares the resolver for explicit behaviors.
ℹ️ Profiles already in the broken state still need a manual re-selection
The fix only changes the write path, so a profile that already persisted { terminalLinkClickBehavior: 'actions', terminalLinkActionPopoverEnabled: false } from the affected build still resolves to none on load. After upgrading, Settings still shows "Leave to terminal" until the user clicks Actions again; at that point it now sticks. If auto-healing that cohort is desired, the only place that can tell "explicit actions from the broken build" apart from "legacy profile that got the default" is a one-shot normalization that inspects the raw persisted key before the default merge. Otherwise this is a reasonable tradeoff.
Technical details
# Existing affected profiles are not migrated
## Affected sites
- `src/main/persistence/loading-store/normalize-loaded-global-settings.ts:58` — `...defaults.settings` merges `terminalLinkClickBehavior: 'actions'` before the persisted settings, so the resolver cannot distinguish explicit `actions` from the legacy default after load.
- `src/renderer/src/components/terminal-pane/terminal-link-click-behavior.ts:18` — returns `'none'` for `{ actions, terminalLinkActionPopoverEnabled: false }`.
- `src/renderer/src/components/settings/BrowserTerminalLinkActionsSetting.tsx:96` — write-side fix in scope.
## Required outcome
- Decide whether the cohort already stuck on "Leave to terminal" should be healed automatically on upgrade, or whether re-selecting Actions (now working) is the accepted remedy.
## Suggested approach (optional)
- A one-shot normalization could read the raw `parsed.settings.terminalLinkClickBehavior === 'actions'` together with `terminalLinkActionPopoverEnabled === false` before the default merge and set the legacy flag `true`. This is only safe because the broken build is what persisted the explicit `'actions'` alongside the legacy `false`.
## Open questions for the human
- Is the manual re-selection acceptable, or do you want the load-time migration?ℹ️ Nitpicks
BrowserTerminalLinkActionsSetting.tsx:100— the comment says "Clear it so the control does not snap back", but the code sets the legacy flag totruerather than clearing it. "Re-enable it" reads truer to what the line does.- The PR title and body say the explicit
actionschoice now wins over the legacy flag, but the resolver is intentionally unchanged — the win happens at the settings write. Aligning the title with the commit message ("write the legacy popover flag when Actions is picked") would keep the next reader from expecting a resolver change.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Records the retained adapted contribution from #25591 in replacement PR #26853. Co-authored-by: drakeo338 <[email protected]>

ELI5
Picking "Actions" for plain-click on terminal links now sticks, even if an old setting had turned the popover off.
What Changed
terminalLinkClickBehaviorForfell back to the legacyterminalLinkActionPopoverEnabled: falseflag when the behavior wasactions, so it resolved tononeand the control snapped back to "Leave to terminal". An explicitactionschoice now wins, and picking Actions in settings also writes the legacy flag as enabled.Why
The explicit setting should override the legacy flag; the legacy flag is only meant for profiles that never chose.
Linked Issue
Fixes #25576.
Visual Proof
N/A, settings logic fix covered by unit tests; no screenshots taken.
Testing
The new and updated tests fail on the old code and pass now (9 passed). Lint, typecheck and build were not run locally.
AI Disclosure
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Renderer settings logic only; no platform, SSH or path impact.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)