Skip to content

feat(desktop): narrow Files changed list beside the terminal - #9199

Open
harshithmullapudi wants to merge 3 commits into
mainfrom
superset/gh-9198-narrow-changes-list-implement-pa-4cceadf1
Open

harshithmullapudi wants to merge 3 commits into
mainfrom
superset/gh-9198-narrow-changes-list-implement-pa-4cceadf1

Conversation

@harshithmullapudi

@harshithmullapudi harshithmullapudi commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Links

Summary

  • Add Files changed (the existing list-only changes-list pane) to the right-pane options, so it shows in the + menu and on the right-pane new tab.
  • Make the right pane area's placeInTabs honour openPane({ beside }), so a file clicked in that list opens the diff stacked above the list instead of in a new tab that hides the list.

Why / Context

People want a narrow, persistent file list next to the agent terminal without an open diff viewer. The list inside DiffPane hides below 540 px, and the Files overlay closes after each pick. ChangesListPane already showed only the list, but nothing could create it. This is option 1 from the issue triage.

How It Works

  • RIGHT_PANE_OPTIONS gets { kind: "changes-list", label: msg({ message: "Files changed" }), Icon: LuFiles }, and createRightPane returns { kind, data: { kind } }. RightPaneKind includes the new kind.
  • ChangesListPane calls openBesidePane, which calls store.openPane({ beside }). In the right area the store's placePane is placeInTabs, which ignored beside and opened a tab, so the first click opened a separate Changes tab. placeInTabs now reuses an unpinned pane of the same kind in the anchor's tab, or splits a new one in above the anchor. It stacks rather than splitting sideways because panes are at least 260 px wide, and a side-by-side split pushed a ~280 px list past the window edge. openBesidePane is unchanged, so getPaneKey reuse through openPane still applies. The center store is not affected.

Manual QA Checklist

Done end to end over CDP in the desktop dev build (screenshots on the page):

  • Before: the + menu has no list-only option; Changes at ~420 px hides the list; the Files overlay closes after picking a file
  • After: "Files changed" appears in the + menu under Changes and opens a list-only pane in the right area
  • The pane stays usable at ~280 px beside a terminal (the full toolbar fits)
  • At ~290 px, clicking a file stacks one diff pane above the list (list header stays on screen); a second click reuses that pane
  • Closing the diff leaves the list open

Testing

  • bun test src/renderer/routes/_authenticated/_dashboard/v2-workspace (1159 pass)
  • New placeInTabs.test.ts case "stacks a beside pane above its anchor, then reuses it" (fails before the fix, passes after); paneOptions.test.ts covers the new option
  • bun run typecheck (desktop), biome check on changed files
  • bun run check:i18n: "Files changed" already exists in every catalog (it is the pane title), 0 missing, no catalog changes

Design Decisions

  • Honour beside in placeInTabs, not in openBesidePane: this keeps a single placement path through openPane (including getPaneKey reuse). After review it is the only right-area placement, and openBesidePane is the only production caller that passes beside.
  • Stack, don't split sideways, in the right area: that area is a sidebar column, and two panes of 260 px or more side by side don't fit at the widths this issue is about.
  • No compact mode: at 280 px the normal toolbar still fits, and compact mode drops the commit/base-branch filter.

Known Limitations

  • The stacked diff is as narrow as the column. Widen the area or use the full Changes view for a real review.
  • Diff panes are only reused inside the list's tab. If a Changes diff is already open in another right-area tab, the list opens a second one beside itself. This is intended: the diff stays next to the list.
  • ReviewPane also uses openBesidePane: in the right area, items opened from Review now stack above the review list instead of opening a new tab.
  • Option 3 from the issue (persist the overlay choice) is not included.

Summary by CodeRabbit

  • New Features
    • Added a “Files changed” option when opening a workspace pane.
  • Improvements
    • Opening a pane beside an existing pane can reuse an unpinned pane of the same type, updating its content and activating it.
    • When no pane can be reused, the new pane is placed beside the selected pane without changing focus.
    • If the selected pane or its tab is unavailable, existing tab-wide reuse and new-tab behavior remains unchanged.

The changes-list pane (a list-only Changes view) was registered but
nothing could open it. Add it to RIGHT_PANE_OPTIONS so it shows in the
+ menu and the right-pane new tab, for a narrow, persistent file list
beside the agent terminal without an open diff (GH #9198, SUPER-3078).
… area

openBesidePane delegated to store.openPane, and the right pane area's
placeInTabs ignores `beside` and opens a new tab. A file clicked in the
Files changed list then opened a Changes tab that hid the list. Reuse an
unpinned pane of the same kind in the anchor's tab, else split it in to
the left, in openBesidePane itself. The center store behaves as before.
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a00f8060-16a4-412d-840a-16fddb3732fa
Commits

Reviewing files that changed from the base of the PR and between d4b0399 and fcd8eab.

Files selected for processing: 2
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspacePaneLayout/utils/placeInTabs/placeInTabs.test.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspacePaneLayout/utils/placeInTabs/placeInTabs.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

The workspace adds a “Files changed” pane option with the changes-list kind. Pane placement now uses a valid beside anchor to reuse a matching unpinned pane or create a split beside the anchor.

Changes: Workspace panes

Layer / File(s) Summary
Add changes-list pane
.../RightPaneNewTab/types.ts, .../RightPaneNewTab/paneOptions.ts, .../RightPaneNewTab/paneOptions.test.ts
RightPaneKind includes changes-list. The pane options include “Files changed,” and createRightPane returns data with that kind. Tests check the option and generated pane.
Update beside-pane placement
.../placeInTabs/placeInTabs.ts, .../placeInTabs/placeInTabs.test.ts
When a valid anchor and tab exist, placeInTabs reuses a matching unpinned pane or creates a split beside the anchor. Tests check pane reuse and placement.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature · Severity of issue fixed: Medium

Possibly related issues

Suggested reviewers: saddlepaddle

Merge Risk: Minimal · up to fcd8e

The new files list opens diffs beside it. No actionable merge-blocking issue was established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: adding a narrow Files changed list beside the terminal and related pane behavior.
Description check Passed The description is complete and relevant. It explains what changed, why it changed, implementation decisions, testing, manual QA, linked work, and known limitations. It does not reproduce the template…
Linked Issues check Passed Issue #9198 asks for a narrow, persistent, list-only changed-files view that stays visible when a diff is closed. At head, RIGHT_PANE_OPTIONS in paneOptions.ts adds { kind: "changes-list", label: "Fil…
Out of Scope Changes check Passed The changed files map to the issue objective. paneOptions.ts and types.ts expose the existing changes-list pane. placeInTabs.ts and its test implement placement for panes opened beside an anchor, whic…
Full details: Description check

Explanation

The description is complete and relevant. It explains what changed, why it changed, implementation decisions, testing, manual QA, linked work, and known limitations. It does not reproduce the template's separate Checklist section, but it covers the key required information.

Full details: Linked Issues check

Explanation

Issue #9198 asks for a narrow, persistent, list-only changed-files view that stays visible when a diff is closed. At head, RIGHT_PANE_OPTIONS in paneOptions.ts adds { kind: "changes-list", label: "Files changed", Icon: LuFiles }, so the + menu offers the list-only pane. createRightPane returns { kind, data: { kind } } for "changes-list". RightPaneKind includes the new kind. The list pane opens beside an anchor through openPane({ beside }). placeInTabs.ts now honors beside in the right area. It reuses an unpinned pane of the same kind in the anchor's tab, or splits a new pane with position "top" above the anchor. Closing the diff leaves the list pane in place, so the list stays visible without an open diff. The issue's proposed "compact" mode is not built. The PR instead uses the existing list-only pane, which the PR description says fits at about 280 px. The PR documents this choice, and the code delivers the required visibility behavior. Tests cover the new option (paneOptions.test.ts) and the stacking and reuse behavior (placeInTabs.test.ts). The previous assessment cited openBesidePane.ts placement logic. That logic is no longer in the reviewed change set, so this assessment relies on the current placeInTabs.ts and paneOptions.ts. Not verified: the rendered diff stats in ChangesListPane. That file is not in the change summary, and this assessment does not inspect it.

Full details: Out of Scope Changes check

Explanation

The changed files map to the issue objective. paneOptions.ts and types.ts expose the existing changes-list pane. placeInTabs.ts and its test implement placement for panes opened beside an anchor, which the list-to-diff flow requires. paneOptions.test.ts covers the new option. The placeInTabs behavior also applies to ReviewPane, which calls openBesidePane. In the right area, Review items now stack above the review list instead of opening a new tab. This is a side effect of the shared placement path, and the PR description discloses it. It is connected to the same mechanism and is not an unrelated feature change. The PR objectives mention a Vale lint failure on CTASection.tsx. That file is not part of this PR's changes and does not bear on the issue's coding requirements. No unrelated coding change was found in the reviewed change summary.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 5 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

🔗 Preview Links

Service Status Link
Neon Database (Neon) ✅ View Branch
Vercel API (Vercel) ✅ Open Preview
Vercel Web (Vercel) ✅ Open Preview
Vercel Marketing (Vercel) ✅ Open Preview
Vercel Docs (Vercel) ✅ Open Preview

Preview updates automatically with new commits

@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Adds “Files changed” to the right-pane choices. File clicks now open or reuse a pane beside the list instead of hiding it behind another tab.

  • The right-pane choices now include a list-only “Files changed” pane.
  • Items opened beside a pane now stay in the anchor’s tab.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Choose Files changed] --> B[Open list in right area]
  B --> C[Click a file]
  C --> D{Unpinned diff in this tab?}
  D -->|Yes| E[Update and focus that pane]
  D -->|No| F[Split a diff left of the list]
  E --> G[List stays in the same tab]
  F --> G
Loading

Reviews (1) · Last reviewed commit: "fix(desktop): open beside-panes beside t..." · Reviewed by Greptile

@expo

expo Bot commented Oct 31, 2026

Copy link
Copy Markdown

🎉 Your workflow run has finished!

Check out the details below.


Builds

ID Platform Status Actions
eca66a3 iOS ✅ Success (logs) Install Download
Open QR Code Install QR code for build eca66a32-4144-4200-b284-e398cb839097

Copy link
Copy Markdown
Contributor

Review verdict: minor issues. The change is small and works in the desktop dev build: "Files changed" shows on the right-pane new tab, a file click splits a diff beside the list, a second click reuses that diff, and closing the diff leaves the list open. The new regression test fails on main and passes here. Typecheck passes.

Findings:

  • Medium openBesidePane.ts:34: at the target width (~290 px right area), the first file click pushes the list off screen. Its header measures at x=1924 in a 1920 px window. This is the main use case from Changes: keep a narrow file list visible without an open diff #9198, not an edge case. Widen the area, open the diff in the center, or stack the diff top/bottom when the area is narrow. Or link a follow-up ticket.
  • Medium openBesidePane.ts:22-39: this copies the beside branch of placeNewPane (packages/panes/src/core/store/store.ts:267-286) and skips reuseOpenPane/getPaneKey. After this PR, no production code calls openPane({ beside }). Make placeInTabs honor beside and keep delegating, or remove beside from @superset/panes.
  • Low openBesidePane.ts:23-28: a diff already open in another right tab is no longer reused, so you can end up with two diff viewers. Say in the description that this is intended (it also changes ReviewPane).

CI: everything passes except Vale prose lint. Vale fails on a missing apps/marketing/.../CTASection.tsx, which this PR does not touch.

Full report with screenshots: https://app.superset.sh/page/pr-9199-review-narrow-files-changed-list-8yetpn

…chor

Review feedback: openBesidePane copied the beside branch of the panes
store and skipped getPaneKey reuse. Revert it to delegate to openPane,
and make the right pane area's placeInTabs honor `beside` instead:
reuse an unpinned pane of the kind in the anchor's tab, else split it in
above the anchor. Stacking keeps a ~280 px Files changed list on screen,
where a side-by-side split pushed it past the window (panes are >= 260 px).

This branch was successfully deployed

1 active deployment
preview — fcd8eabd Deployed Oct 31, 2026 by harshithmullapudi via Deploy API #13429
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github GitHub-sourced work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changes: keep a narrow file list visible without an open diff

2 participants