Skip to content

BUG: Button between dashboard button and session tabs does nothing #265

Description

@jeonghun-jj-lee

BUG: Button between dashboard button and session tabs does nothing

Important

Problem: A sidebar toggle button (icon: sidebar-left) renders in the v2 titlebar between the dashboard button and session tabs. Clicking it produces no visible effect.

Root cause: The button calls layout.sidebar.toggle(), but the only consumer of that signal — WorkbenchPanel inside SplitFrame — lives in the legacy layout path, which never mounts when newLayoutDesigns = true (the current default). The button flips a boolean no active component observes.

Approach: Remove the IconButtonV2 block from the v2 titlebar in titlebar.tsx. Leave a comment indicating re-addition when WorkbenchPanel is ported to NewLayout.

Scope: Button removal only. WorkbenchPanel, SplitFrame, sidebar state machinery, and the legacy titlebar's own toggle all stay untouched — the panel feature is planned for porting.

Acceptance Criteria

  • The sidebar-left IconButtonV2 no longer renders in the v2 titlebar
  • A comment at the removal site references BUG: Button between dashboard button and session tabs does nothing #265 and notes re-addition when the panel is ported to layout-new.tsx
  • No regression in the legacy layout path (the <Match when> fallback in the <Switch> still renders its own sidebar toggle for completeness)
  • The app builds cleanly (pnpm build in packages/app)

Key Decisions

Decision Resolution Rationale
Scope Button only WorkbenchPanel is planned for porting to NewLayout; removing it prematurely kills future work
Dead code cleanup None Sidebar state + WorkbenchPanel stay as scaffolding for the port
Release vehicle Next scheduled opencode fork bump Cosmetic-only bug, no data loss or broken workflow
Tests None to update No existing tests reference the sidebar toggle

Constraints & Invariants

  • The layout.sidebar state and its persistence must remain intact (used by the planned port)
  • The legacy layout path (newLayoutDesigns = false) is not touched
  • The command.sidebar.toggle i18n key stays (shared with the legacy path)

Prior Art

  • WorkbenchPanel (workbench-panel.tsx) — the sessions list panel this button was meant to toggle
  • SplitFrame (split-frame.tsx:314) — where the panel renders, gated on layout.sidebar.opened() && location.pathname !== "/"
  • layout-new.tsx — the active layout shell; has no sidebar consumer

Source

Notes

  • The v2 titlebar is the active path (newLayoutDesigns defaults to true, confirmed by settings.test.ts)
  • The button was added as part of "workbench S1" (session panel visibility) but the panel was only wired into the legacy SplitFrame, not NewLayout
  • When WorkbenchPanel is eventually ported to layout-new.tsx, re-add the toggle button at the same position (between home button and session tabs)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions