Skip to content

fix(app): enable debug tools toggle on local channel - #49278

Merged
Hona merged 1 commit into
anomalyco:v2from
Hona:debug-toggle-local
Sep 16, 2026
Merged

Hona merged 1 commit into
anomalyco:v2from
Hona:debug-toggle-local

Conversation

@Hona

@Hona Hona commented Sep 16, 2026

Copy link
Copy Markdown
Member

Clicking the channel badge in a bun dev desktop build did nothing, so the dev DebugBar (nav/fps/inp/focus toggle) could not be opened.

  • packages/desktop/scripts/dev.ts runs the renderer with VITE_OPENCODE_CHANNEL = "local", but ChannelIndicator only wired the debug-tools toggle for "dev". The badge rendered as a plain div.
  • Reading props.debugTools from the click handler leaked a createMemo (computations created outside a createRoot ... will never be disposed) because the Solid compiler wraps the conditional prop expression in a memo. The prop is now a plain object with a visible getter.
// titlebar.tsx
const debug = () => (channel === "dev" || channel === "local" ? props.debugTools : undefined)

// shell.tsx
const debugTools = import.meta.env.DEV
  ? { get visible() { return state.debugTools }, toggle: () => setState("debugTools", (v) => !v) }
  : undefined

@Hona
Hona requested a review from Brendonovich as a code owner September 16, 2026 04:44
Copilot AI lite review requested due to automatic review settings September 16, 2026 04:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Hona
Hona enabled auto-merge (squash) September 16, 2026 04:49
@Hona
Hona merged commit 0055227 into anomalyco:v2 Sep 16, 2026
10 checks passed
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.

2 participants