Skip to content

feat(opencode): add killswitch indicators to TUI sidebar#39

Open
iceteaSA wants to merge 1 commit into
cortexkit:mainfrom
iceteaSA:feat/killswitch-sidebar
Open

feat(opencode): add killswitch indicators to TUI sidebar#39
iceteaSA wants to merge 1 commit into
cortexkit:mainfrom
iceteaSA:feat/killswitch-sidebar

Conversation

@iceteaSA
Copy link
Copy Markdown
Contributor

@iceteaSA iceteaSA commented May 21, 2026

Summary

Adds killswitch indicators to the TUI quota sidebar, integrated with the collapsible sidebar.

Builds on the merged killswitch (#35) and collapsible sidebar (#58).

Changes

  • Expanded view (tui.tsx): each AccountBlock shows a blocked status (error tone) when killswitch-blocked; killedNames feeds degraded() (so the LIMITED header badge lights up) and a Killswitch row in the Health section lists blocked accounts.
  • Collapsed view (tui.tsx): when the active account is blocked, the collapsed row's dot becomes a red instead of the usage dot (the percentage stays usage-toned).
  • State (sidebar-state.ts): SidebarAccountState/main gain a killed flag; resolveActiveAccount returns it. index.ts writeSidebarState computes killed from killswitch policy.
  • Tests: sidebar-state.test.ts covers the killed passthrough in resolveActiveAccount.

Notes

Now that #35 and #58 are in main, this PR is just the sidebar-indicator delta on top of them.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 16 files

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Fix all with cubic | Re-trigger cubic

Comment thread packages/core/src/accounts.ts Outdated
Comment thread packages/opencode/src/tui.tsx Outdated
@iceteaSA iceteaSA force-pushed the feat/killswitch-sidebar branch 2 times, most recently from 84f44e5 to 583586a Compare May 21, 2026 20:20
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 21, 2026

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

@iceteaSA iceteaSA force-pushed the feat/killswitch-sidebar branch 4 times, most recently from 09b34c3 to 8339edc Compare May 22, 2026 17:08
@iceteaSA iceteaSA force-pushed the feat/killswitch-sidebar branch 10 times, most recently from e86d9d3 to a8d6404 Compare June 3, 2026 18:24
Comment thread packages/opencode/src/index.ts Outdated
Comment thread packages/opencode/src/index.ts Outdated
@iceteaSA iceteaSA force-pushed the feat/killswitch-sidebar branch from a8d6404 to ecffae9 Compare June 3, 2026 18:58
Comment thread packages/opencode/src/index.ts Outdated
@iceteaSA iceteaSA force-pushed the feat/killswitch-sidebar branch 4 times, most recently from 4988ae1 to 78b02b4 Compare June 3, 2026 19:53
Comment thread packages/opencode/src/index.ts Outdated
@iceteaSA iceteaSA force-pushed the feat/killswitch-sidebar branch 4 times, most recently from eaf91c9 to 3147ad3 Compare June 3, 2026 21:03
@iceteaSA
Copy link
Copy Markdown
Contributor Author

iceteaSA commented Jun 4, 2026

Updated: this branch now carries the sidebar quota fix (#57) and the collapsible sidebar (#58), and integrates the collapsed view with the killswitch indicators — the collapsed active-account row shows a red ⊘ (instead of the usage dot) when that account is killswitch-blocked; resolveActiveAccount exposes killed. #57 and #58's commits appear here until they merge. Merge order: #57#58 → this PR.

@iceteaSA iceteaSA force-pushed the feat/killswitch-sidebar branch from c73b37e to 5eb08e5 Compare June 4, 2026 08:08
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iceteaSA has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

Layer killswitch awareness onto the restyled sidebar (killed state in
SidebarState + writeSidebarState via killswitchPassesPolicy, blocked status
word, Killswitch health row, degraded/LIMITED inclusion).

Also restores the process-scoped 'let sessionRequestCount' (a prior cascade
had flipped it to const, which left the active-route fallback every-N refresh
reading a never-incremented counter).
@iceteaSA iceteaSA force-pushed the feat/killswitch-sidebar branch from 5eb08e5 to d8b1bb3 Compare June 5, 2026 16:44
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iceteaSA has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

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