Skip to content

Right panel multi-tab infrastructure#501

Merged
srid merged 7 commits intomasterfrom
right-panel-tabs
Apr 13, 2026
Merged

Right panel multi-tab infrastructure#501
srid merged 7 commits intomasterfrom
right-panel-tabs

Conversation

@srid
Copy link
Copy Markdown
Member

@srid srid commented Apr 13, 2026

The right panel now has three tabs — Inspector, Files, and Git — replacing the single hardcoded Inspector view. This is the structural plumbing for #479 Phase 0.5: Phases 1 and 2 fill the Files and Git tabs with file tree/search and diff viewer respectively, but the tab routing, persistence, and layout are done here so those phases can focus purely on feature logic.

Tab state is persisted server-side alongside the existing panel collapsed/size preferences. The three flat rightPanel* preference fields are consolidated into a single nested rightPanel: { collapsed, size, tab } object, with a deep-partial patch mechanism so callers can update individual sub-fields without overwriting siblings. Migration 1.7.0 converts the old flat layout automatically.

The Section component — the titled container with border and uppercase label that MetadataInspector uses throughout — is extracted to a shared module so Files and Git tabs reuse it instead of duplicating the markup. Files tab shows CWD + repo root as placeholder content; Git tab shows branch, worktree status, and PR details. Both are shells that Phases 1 and 2 will replace with real features.

PreferencesPatch is a new exported type that models the deep-partial shape — useServerState.updatePreferences now accepts it instead of Partial<Preferences>, and the SolidJS store setter uses path-based updates to deep-merge rightPanel sub-fields.

Closes #479 (phase 0.5)

… Git tabs (#479 phase 0.5)

Refactor the right panel from a single hardcoded Inspector view to a
tabbed system that routes between Inspector, Files, and Git tabs.
Files and Git tabs show placeholder content from existing metadata —
Phase 1 fills Files with file tree/search, Phase 2 fills Git with
diff viewer.

- Nest rightPanel preferences (collapsed, size, tab) under a single
  object with deep-partial patch support for ergonomic updates
- Add server migration 1.7.0 converting flat fields to nested
- Extract shared Section component from MetadataInspector for reuse
- Tab state persisted server-side, survives refresh
@srid
Copy link
Copy Markdown
Member Author

srid commented Apr 13, 2026

Hickey Analysis

Concerns: Tab identity, tab persistence, tab routing, Files/Git/Inspector view content, panel chrome.

Finding S1 (Record vs match for tab routing): The prefer-ts-pattern rule recommends match().exhaustive() for string-literal union dispatch, but the exception for "pure A→B mappings" applies here — tab id → component is a static lookup with no per-arm logic. Used a TABS config array with Record-style .find() instead of ts-pattern match, keeping the tab set defined in one place. TypeScript's RightPanelTab type ensures both the tab bar For loop and the content Dynamic routing stay exhaustive.

No fragmentation bugs found. The temporary duplication of metadata across Inspector and Files/Git tabs is intentional phased delivery — Files/Git show placeholder content that Phases 1/2 will replace.

No concept multiplication. Tab definitions live in one TABS array; both rendering and routing derive from it.

Actions: S1 fixed in PR (TABS config array approach).

@srid
Copy link
Copy Markdown
Member Author

srid commented Apr 13, 2026

/do results

Step Status Duration Verification
sync 3s git fetch, forge=github
research 1m 53s Issue #479 phase 0.5 understood
hickey 1m 6s 1 finding fixed (Record vs match)
branch 6s right-panel-tabs from origin/master
implement 5m 14s Schema + migration + tabs + deep-partial
check 3m 9s All packages type-check clean
docs 0s Skipped (none configured)
police 2m 58s Section duplication fixed
fmt 31s Minor reformatting
commit 39s 4cc70ad pushed
test 1m 8s 12 scenarios, 75 steps passed
ci 3m 37s 8/9 green; 6 flaky darwin worktree timeouts
update-pr 1m 2s Draft PR #501
Total 19m 59s

Optimization suggestions

  • Implement was extended mid-step by nested preferences refactor (user feedback) — pre-aligning on schema shape in research saves re-implementation
  • CI dominated by full nix+e2e matrix; --from ci-only for retries
  • Police caught Section duplication that hickey could have flagged — concept multiplication layer improvement

Workflow completed at 2026-04-13T19:01:13Z.

@srid srid marked this pull request as ready for review April 13, 2026 19:29
@srid srid merged commit 63aa6c7 into master Apr 13, 2026
11 checks passed
@srid srid deleted the right-panel-tabs branch April 13, 2026 19:29
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.

File browser: phased implementation plan

1 participant