Skip to content

Decompose render: titlebar as View<TitlebarStrip> — needs snapshot design first #208

Description

@MasonRhodesDev

Context

Render architecture audit from #203. The titlebar/toolbar is the hardest decomposition target: it reads 4+ cross-cutting fields from different subsystems and has no clean snapshot boundary today.

Current cross-cutting reads

  • Active section id — lives in workspace_pane (already an Entity<T>)
  • project_store — active project, current branch, PR status
  • active_git_actions — in-progress git action state (mutated by drain loop)
  • project_pull_requests — PR metadata map (populated by background lookup)
  • custom_actions_menu_open, settings_open — local boolean toggles

Why it's hard

Unlike the sidebar (one snapshot source: project_store), the titlebar aggregates live state from at least three independent subsystems. A naive TitlebarSnapshot would need to be recomputed whenever any of them changes, which is frequent.

What to do (design needed first)

  1. Audit the titlebar render path — map exactly which fields it reads per render and how frequently each changes. Some reads may be cacheable locally.
  2. Design a TitlebarSnapshot — determine the minimal set of data needed. Consider whether workspace_pane.read(cx) inside a titlebar View<T> is sufficient to avoid copying active-section state, or whether a true snapshot is required.
  3. Prototype isolation — the titlebar's local interaction state (custom_actions_menu_open, drag anchors, dropdowns) can move to the view immediately; the cross-cutting reads are the open question.
  4. Implement once the snapshot shape is settled.

File this as a follow-up after #204 (sidebar) and #205 (toasts/resource) land — lessons from those migrations will inform the design here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions