Skip to content

feat(app): redesign Status panel with Git and Artifact sections#1013

Open
Astro-Han wants to merge 9 commits into
devfrom
claude/status-panel-redesign
Open

feat(app): redesign Status panel with Git and Artifact sections#1013
Astro-Han wants to merge 9 commits into
devfrom
claude/status-panel-redesign

Conversation

@Astro-Han
Copy link
Copy Markdown
Owner

@Astro-Han Astro-Han commented May 31, 2026

Summary

  • Restructure the right-side Status panel from 2 sections (Progress + Sources) to 4 sections (Progress → Git → Artifact → Sources)
  • Remove the standalone Files tab, merging artifact display into the Status panel as a compact file list
  • Move the titlebar worktree badge into the Status panel's Git section
  • Register a new changes icon (Imagen → Potrace pipeline) for the Git diff stats row

Changes

Status panel redesign

  • Git section (3 interactive rows): diff stats (+N/−N, click → Review panel), branch name (chevron for future branch picker), worktree indicator (tooltip + click to open directory)
  • Artifact section: compact file list with hover/focus-visible open/reveal buttons, replacing the full Files tab
  • Git section conditionally hidden when not in a git repository
  • Data sources: sync.data.vcs for branch, sessionInfo().executionContext.activeWorktree for worktree, aggregateFiles(turn_change_aggregate) for diff stats

Files tab removal

  • Remove "files" from RightPanelStaticTab, RIGHT_PANEL_TAB_META, command palette, and keybind
  • Legacy persisted "files" values map to "status" via coerceLegacySidePanelTab and migrateLegacyRightPanelTab
  • Tab strip drops the folder icon branch

Titlebar cleanup

  • Remove PawworkWorktreeBadge from session-header.tsx (worktree info now lives in the Status panel Git section)

Test plan

  • TypeScript type check passes (zero errors)
  • 131 unit tests pass across 9 affected test files
  • Legacy "files" tab persistence maps correctly to "status"
  • Codex adversarial review: P1 findings (helpers.test.ts drag-to-self, command-palette fileTree.toggle) fixed and verified
  • Visual check via bun run dev:desktop — walk Status panel with active session in git repo
  • Visual check — Status panel in non-git project (Git section should be hidden)
  • Visual check — Artifact section with session-produced files
  • Verify worktree tooltip matches old titlebar badge behavior

Summary by CodeRabbit

  • New Features

    • Session status panel now shows Git status (branch/worktree hint and diff additions/deletions) and lists artifact files with open/reveal actions.
    • New "changes" icon available in the UI.
  • Refactor

    • Unified legacy "files" panel into the "status" panel (right sidebar now: status, review, context).
    • Removed the file-tree toggle command and the worktree badge from the header.
  • Chores

    • Added English and Chinese translations for Git and artifact status texts.

Astro-Han added 3 commits May 31, 2026 19:19
Remove "files" from RightPanelStaticTab and its metadata, command
palette entry, and keybind. Legacy persisted "files" values map to
"status" via coerceLegacySidePanelTab and migrateLegacyRightPanelTab.

Register the new "changes" icon (Imagen → Potrace pipeline, portrait
14×18 keyshape, document with +/− marks) for the Git environment
section that replaces the standalone Files tab.

Add i18n keys for the new Git and Artifact sections in en/zh.
Restructure the Status panel from two sections (Progress + Sources)
to four (Progress → Git → Artifact → Sources).

Git section shows three interactive rows:
- Diff stats (+N/−N from session aggregate, click → Review panel)
- Branch name (from sync.data.vcs, chevron for future branch picker)
- Worktree indicator (tooltip with name/branch/location, click opens
  directory) — migrated from the titlebar PawworkWorktreeBadge which
  is removed from session-header.tsx

Artifact section replaces the deleted Files tab with a compact list
of session-produced files (filename + open/reveal buttons, hover +
focus-within visibility).

The Git section is conditionally hidden when not in a git repository.
Artifact data flows from session-side-panel via SessionStatusPanel
props as Accessor<FilesTabEntry[]>.
Adapt shell-tab, right-panel-tabs, helpers, migrate-session-view,
command-palette, side-panel, and use-session-commands tests to the
removal of the "files" static tab.

Key changes:
- Legacy "files" values in normalize/coerce/migrate tests now expect
  "status" fallback instead of passthrough
- planShellTabReorder test uses review→context instead of the
  removed files→review pair
- command-palette default items test drops fileTree.toggle
- Type assertion test-d.ts marks "files" as @ts-expect-error
- Add normalizeShellTabs legacy-files-to-status regression test
@Astro-Han Astro-Han added enhancement New feature or request app Application behavior and product flows ui Design system and user interface labels May 31, 2026
@github-actions github-actions Bot added the P2 Medium priority label May 31, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 31, 2026

Review Change Stack

Warning

Review limit reached

@Astro-Han, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 36 minutes and 25 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0a2d229a-e224-488c-a455-1f5804e79502

📥 Commits

Reviewing files that changed from the base of the PR and between defd761 and eb67836.

📒 Files selected for processing (4)
  • packages/app/src/components/session/session-status-summary.tsx
  • packages/app/src/i18n/en.ts
  • packages/app/src/i18n/zh.ts
  • packages/app/src/pages/layout/sidebar-items.tsx
📝 Walkthrough

Walkthrough

PR consolidates the legacy "files" right-panel tab into a new "status" tab, removes the worktree badge from the session header, and enhances the status panel with Git repository information (diff stats, active worktree) and artifact file listings alongside simplified directory opening.

Changes

Right-panel tab migration and status panel enhancement

Layer / File(s) Summary
Right-panel tab type/constant refactor
packages/app/src/pages/session/right-panel-tabs.ts, packages/app/src/context/layout.tsx
RightPanelStaticTab removes the "files" static tab; RIGHT_PANEL_TAB_VALUES and RIGHT_PANEL_TAB_META drop the "files" entry. Legacy migration/coercion functions (migrateLegacyRightPanelTab, coerceLegacySidePanelTab) now map "files""status".
Tab type assertions and layout utilities
packages/app/src/pages/session/right-panel-tabs.test-d.ts, packages/app/src/context/layout.test.ts
Type-level tests confirm the new 3-tab static layout and reject "files" as invalid. defaultSidePanelTab parameter type is broadened to accept legacy "files" input for migration.
SessionStatusPanel/Summary with Git/artifact rendering
packages/app/src/components/session/session-status-panel.tsx, packages/app/src/components/session/session-status-summary.tsx
SessionStatusPanel props expand to include optional artifactFiles and onNavigateReview; new reactive memos compute vcs, activeWorktree, and diffStats. SessionStatusSummary now renders GitSection (displaying diff additions/deletions, active-worktree details via tooltip, and directory-open action) and ArtifactSection (listing artifact files with open/reveal actions), with platform-guarded local-path handling.
SessionHeader simplification
packages/app/src/components/session/session-header.tsx
Removes PawworkWorktreeBadge import and rendering. Eliminates activeWorktree-derived memo logic and the openActiveWorktree helper. Simplifies canOpenProjectDirectory to depend only on projectDirectory.
Command and UI updates
packages/app/src/components/command-palette/command-palette-default-items.ts, packages/app/src/components/command-palette/command-palette-default-items.test.ts, packages/app/src/pages/session/right-panel-tab-strip.tsx, packages/ui/src/components/icon.tsx
Removes fileTree.toggle from default command groups and test expectations. Updates RightPanelShellIcon to drop the folder icon branch. Adds new "changes" icon to the icon registry.
Tab routing and validation tests
packages/app/src/pages/session/right-panel-tabs.test.ts
Comprehensive test coverage for the new tab model: isRightPanelTab rejects "files", migrateLegacyRightPanelTab and coerceLegacySidePanelTab map "files""status", and normalizeShellTabs injects "status" when absent and drops legacy "files" entries.
Shell tab transitions and session migration tests
packages/app/src/context/layout.shell-tabs.test.ts, packages/app/src/context/layout.test.ts, packages/app/src/pages/session/migrate-session-view.test.ts
Tests for openShellTab, closeShellTab, toggleShellTab, moveShellTab, and session migration updated to reflect the 3-tab layout and proper handling of legacy "files" coercion.
Tab reorder helper tests
packages/app/src/pages/session/helpers.test.ts
planShellTabReorder drag/drop tests updated to use "review" instead of "files" and reflect new expected reorder indices and clamping behavior.
SessionSidePanel integration and mocking
packages/app/src/pages/session/session-side-panel.tsx, packages/app/src/pages/session/session-side-panel.test.tsx
SessionSidePanel passes artifactFiles and onNavigateReview to SessionStatusPanel. Removes FilesTab import and the files-tab module mock. Test sortableShellTabIds assertion updated to ["review", "context"], and the "files" gating test removed.
Session command routing
packages/app/src/pages/session/use-session-commands.tsx, packages/app/src/pages/session/use-session-commands.test.ts
Removes fileTree.toggle view command from viewCmds() (the mod+\ keybind). Test updates "static tab close" to use activeTab: "review" with corresponding assertion.
i18n translations
packages/app/src/i18n/en.ts, packages/app/src/i18n/zh.ts
New translation keys for status panel Git UI (status.summary.git, status.summary.git.changes, status.summary.git.worktree.open) and artifact UI (status.summary.artifact, status.summary.artifact.empty, status.summary.artifact.open, status.summary.artifact.reveal).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Astro-Han/pawwork#390: Removes PawworkWorktreeBadge from SessionHeader in this PR, while #390 refactors the badge component itself—directly connected around the same worktree UI.
  • Astro-Han/pawwork#71: This PR extends SessionStatusPanel/SessionStatusSummary with Git/artifact subsections built on status components introduced in #71, representing incremental UI enhancement of the status area.
  • Astro-Han/pawwork#110: Both PRs change the session right-panel shell/tab model and its legacy migration/coercion logic (notably around “files”/static tabs and pinned status behavior).

Suggested labels

refactor, ui

Poem

🐰 The files tab hops away into status,
Git diffs and artifacts now show their fuss,
Worktree badge bids farewell with grace,
One unified home in a cleaner space! 🏠✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description covers Summary (what changed), Changes (implementation details), but lacks explicit Why/context, Related Issue link, Human Review Status, Review Focus, Risk Notes, How To Verify (visual checks pending), and incomplete Checklist. Complete the description template: add Why section explaining the goal, link the related issue, set Human Review Status explicitly, detail Review Focus, Risk Notes (including skipped checklist items), and verify all tests passed with results.
Docstring Coverage ⚠️ Warning Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: redesigning the Status panel to include Git and Artifact sections, which is the primary focus of this multi-file refactoring.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/status-panel-redesign

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Suggested priority: P2 (includes user-path files (packages/app/src/components/command-palette/command-palette-default-items.test.ts, packages/app/src/components/command-palette/command-palette-default-items.ts, packages/app/src/components/session/session-header.tsx, packages/app/src/components/session/session-status-panel.tsx, packages/app/src/components/session/session-status-summary.tsx, packages/app/src/context/layout.shell-tabs.test.ts, packages/app/src/context/layout.test.ts, packages/app/src/context/layout.tsx, packages/app/src/i18n/en.ts, packages/app/src/i18n/zh.ts, packages/app/src/pages/session/helpers.test.ts, packages/app/src/pages/session/migrate-session-view.test.ts, packages/app/src/pages/session/right-panel-tab-strip.tsx, packages/app/src/pages/session/right-panel-tabs.test-d.ts, packages/app/src/pages/session/right-panel-tabs.test.ts, packages/app/src/pages/session/right-panel-tabs.ts, packages/app/src/pages/session/session-side-panel.test.tsx, packages/app/src/pages/session/session-side-panel.tsx, packages/app/src/pages/session/use-session-commands.test.ts, packages/app/src/pages/session/use-session-commands.tsx)).

P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the session side panel by merging the legacy "files" tab into the "status" panel, removing the separate files tab, and updating associated commands, tests, and types. Additionally, it integrates Git status (changes, branch, worktree) and artifact file listings directly into the status summary. Feedback on these changes highlights opportunities to improve accessibility by conditionally disabling non-interactive buttons, localizing hardcoded strings in the Git worktree tooltip, and ensuring cross-platform path compatibility for Windows environments when extracting filenames.

Comment on lines +72 to +84
<button
type="button"
class="flex w-full items-center gap-2 rounded-sm px-1 py-1 text-left transition-colors hover:bg-surface-raised"
classList={{ "cursor-default": !props.onClick }}
onClick={props.onClick}
title={props.title}
>
<Icon name={props.icon as any} class="shrink-0 text-fg-weak" />
<div class="min-w-0 flex-1">{props.children}</div>
<Show when={props.chevron}>
{(dir) => <Icon name={dir() === "down" ? "chevron-down" : "chevron-right"} class="shrink-0 text-fg-weaker" />}
</Show>
</button>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

When props.onClick is undefined, the row is not interactive but remains focusable and displays a hover background (hover:bg-surface-raised). To improve accessibility and UX, disable the button when not clickable and apply the hover style conditionally.

    <button
      type="button"
      disabled={!props.onClick}
      class="flex w-full items-center gap-2 rounded-sm px-1 py-1 text-left transition-colors"
      classList={{
        "hover:bg-surface-raised cursor-pointer": !!props.onClick,
        "cursor-default opacity-100": !props.onClick,
      }}
      onClick={props.onClick}
      title={props.title}
    >
      <Icon name={props.icon as any} class="shrink-0 text-fg-weak" />
      <div class="min-w-0 flex-1">{props.children}</div>
      <Show when={props.chevron}>
        {(dir) => <Icon name={dir() === "down" ? "chevron-down" : "chevron-right"} class="shrink-0 text-fg-weaker" />}
      </Show>
    </button>

Comment on lines +101 to +116
const worktreeTooltip = (worktree: ActiveWorktree) => (
<div class="grid min-w-0 gap-1.5 py-1 text-left">
<div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
<span class="text-caption">Worktree</span>
<span class="text-h3 min-w-0 break-all leading-[1.45]">{worktree.name || "Not available"}</span>
</div>
<div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
<span class="text-caption">Branch</span>
<span class="text-body min-w-0 break-all leading-[1.45]">{worktree.branch || "Not available"}</span>
</div>
<div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
<span class="text-caption">Location</span>
<span class="text-body min-w-0 break-all leading-[1.45]">{worktree.directory || "Not available"}</span>
</div>
</div>
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The tooltip labels ("Worktree", "Branch", "Location") and fallback text ("Not available") are hardcoded. To support internationalization (i18n), these strings should be localized using language.t with corresponding keys added to the translation dictionaries.

Suggested change
const worktreeTooltip = (worktree: ActiveWorktree) => (
<div class="grid min-w-0 gap-1.5 py-1 text-left">
<div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
<span class="text-caption">Worktree</span>
<span class="text-h3 min-w-0 break-all leading-[1.45]">{worktree.name || "Not available"}</span>
</div>
<div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
<span class="text-caption">Branch</span>
<span class="text-body min-w-0 break-all leading-[1.45]">{worktree.branch || "Not available"}</span>
</div>
<div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
<span class="text-caption">Location</span>
<span class="text-body min-w-0 break-all leading-[1.45]">{worktree.directory || "Not available"}</span>
</div>
</div>
)
const worktreeTooltip = (worktree: ActiveWorktree) => (
<div class="grid min-w-0 gap-1.5 py-1 text-left">
<div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
<span class="text-caption">{language.t("status.summary.git.worktree")}</span>
<span class="text-h3 min-w-0 break-all leading-[1.45]">{worktree.name || language.t("status.summary.git.not_available")}</span>
</div>
<div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
<span class="text-caption">{language.t("status.summary.git.branch")}</span>
<span class="text-body min-w-0 break-all leading-[1.45]">{worktree.branch || language.t("status.summary.git.not_available")}</span>
</div>
<div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
<span class="text-caption">{language.t("status.summary.git.location")}</span>
<span class="text-body min-w-0 break-all leading-[1.45]">{worktree.directory || language.t("status.summary.git.not_available")}</span>
</div>
</div>
)

}}
title={language.t("status.summary.git.worktree.open")}
>
<span class="text-body text-fg-base">{worktree().name || worktree().branch || "Worktree"}</span>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The fallback string "Worktree" is hardcoded. Use the localized string language.t("status.summary.git.worktree") instead.

Suggested change
<span class="text-body text-fg-base">{worktree().name || worktree().branch || "Worktree"}</span>
<span class="text-body text-fg-base">{worktree().name || worktree().branch || language.t("status.summary.git.worktree")}</span>

Comment on lines +177 to +180
const filename = createMemo(() => {
const parts = props.file.path.split("/")
return parts[parts.length - 1] || props.file.path
})
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Splitting the path only by / will fail to extract the correct filename on Windows platforms where paths use backslashes (\). Use a regular expression or replace backslashes to split by both forward and backward slashes.

Suggested change
const filename = createMemo(() => {
const parts = props.file.path.split("/")
return parts[parts.length - 1] || props.file.path
})
const filename = createMemo(() => {
const parts = props.file.path.replace(/\\/g, "/").split("/")
return parts[parts.length - 1] || props.file.path
})

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
packages/app/src/pages/session/right-panel-tabs.ts (1)

11-14: 💤 Low value

Stale comment still references the removed files slot.

Line 5 was updated to "status / review / context", but this block still describes terminal tabs as "sibling of files/review/context". Worth aligning since "files" no longer exists.

📝 Suggested wording tweak
- * Pre-flatten, "terminal" was a fixed slot containing an internal multi-terminal
- * strip. After flatten (Area B, 2026-05-25) each terminal is its own outer tab,
- * sibling of files/review/context. Legacy persistence with "terminal" as a fixed
- * slot is dropped via migrateLegacyRightPanelTab / coerceLegacySidePanelTab.
+ * Pre-flatten, "terminal" was a fixed slot containing an internal multi-terminal
+ * strip. After flatten (Area B, 2026-05-25) each terminal is its own outer tab,
+ * sibling of status/review/context. Legacy persistence with "terminal" as a fixed
+ * slot is dropped via migrateLegacyRightPanelTab / coerceLegacySidePanelTab.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/app/src/pages/session/right-panel-tabs.ts` around lines 11 - 14,
Update the stale comment that still mentions the removed "files" slot: change
the phrase describing terminal tabs as "sibling of files/review/context" to the
current naming "sibling of status/review/context" (or whichever current slots
are accurate), keeping the rest of the note about legacy persistence and the
references to migrateLegacyRightPanelTab and coerceLegacySidePanelTab intact so
the comment reflects the current tab layout.
packages/app/src/components/session/session-status-summary.tsx (1)

64-86: 💤 Low value

Consider stricter typing for icon names.

Line 79 uses as any to bypass icon name type checking. While this may be necessary for the icon system's flexibility, it prevents catching invalid icon names at compile time.

If the Icon component supports a union of valid icon names, consider typing props.icon as that union instead of string to eliminate the need for the type assertion.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/app/src/components/session/session-status-summary.tsx` around lines
64 - 86, The GitRow component currently types props.icon as string and uses an
unsafe cast (as any) when passing to Icon, which hides invalid icon names;
update GitRow's prop type for icon to the Icon component's exact icon-name
union/type (e.g., IconName or the IconProps['name'] type exported by the Icon
module) and remove the as any cast, importing that type from the Icon file and
using it in the props declaration so the compiler enforces valid icon names when
calling GitRow.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/app/src/components/session/session-status-summary.tsx`:
- Around line 101-116: The tooltip component function worktreeTooltip (accepting
ActiveWorktree) uses hardcoded English strings; replace the literal labels
("Worktree", "Branch", "Location") and fallback text ("Not available") with i18n
lookups (e.g., t('status.summary.git.worktree.tooltip.worktree') etc.), and add
the corresponding keys to the locale files (en.ts and zh.ts) for those four
entries; ensure you import/use the same translation function used elsewhere in
this file/component so the tooltip text is localized at render time.

---

Nitpick comments:
In `@packages/app/src/components/session/session-status-summary.tsx`:
- Around line 64-86: The GitRow component currently types props.icon as string
and uses an unsafe cast (as any) when passing to Icon, which hides invalid icon
names; update GitRow's prop type for icon to the Icon component's exact
icon-name union/type (e.g., IconName or the IconProps['name'] type exported by
the Icon module) and remove the as any cast, importing that type from the Icon
file and using it in the props declaration so the compiler enforces valid icon
names when calling GitRow.

In `@packages/app/src/pages/session/right-panel-tabs.ts`:
- Around line 11-14: Update the stale comment that still mentions the removed
"files" slot: change the phrase describing terminal tabs as "sibling of
files/review/context" to the current naming "sibling of status/review/context"
(or whichever current slots are accurate), keeping the rest of the note about
legacy persistence and the references to migrateLegacyRightPanelTab and
coerceLegacySidePanelTab intact so the comment reflects the current tab layout.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 831a049e-6cf6-46bc-b5ff-dedf061e823d

📥 Commits

Reviewing files that changed from the base of the PR and between 663bda2 and c598169.

📒 Files selected for processing (21)
  • packages/app/src/components/command-palette/command-palette-default-items.test.ts
  • packages/app/src/components/command-palette/command-palette-default-items.ts
  • packages/app/src/components/session/session-header.tsx
  • packages/app/src/components/session/session-status-panel.tsx
  • packages/app/src/components/session/session-status-summary.tsx
  • packages/app/src/context/layout.shell-tabs.test.ts
  • packages/app/src/context/layout.test.ts
  • packages/app/src/context/layout.tsx
  • packages/app/src/i18n/en.ts
  • packages/app/src/i18n/zh.ts
  • packages/app/src/pages/session/helpers.test.ts
  • packages/app/src/pages/session/migrate-session-view.test.ts
  • packages/app/src/pages/session/right-panel-tab-strip.tsx
  • packages/app/src/pages/session/right-panel-tabs.test-d.ts
  • packages/app/src/pages/session/right-panel-tabs.test.ts
  • packages/app/src/pages/session/right-panel-tabs.ts
  • packages/app/src/pages/session/session-side-panel.test.tsx
  • packages/app/src/pages/session/session-side-panel.tsx
  • packages/app/src/pages/session/use-session-commands.test.ts
  • packages/app/src/pages/session/use-session-commands.tsx
  • packages/ui/src/components/icon.tsx
💤 Files with no reviewable changes (4)
  • packages/app/src/pages/session/right-panel-tab-strip.tsx
  • packages/app/src/pages/session/use-session-commands.tsx
  • packages/app/src/components/command-palette/command-palette-default-items.test.ts
  • packages/app/src/components/session/session-header.tsx

Comment on lines +101 to +116
const worktreeTooltip = (worktree: ActiveWorktree) => (
<div class="grid min-w-0 gap-1.5 py-1 text-left">
<div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
<span class="text-caption">Worktree</span>
<span class="text-h3 min-w-0 break-all leading-[1.45]">{worktree.name || "Not available"}</span>
</div>
<div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
<span class="text-caption">Branch</span>
<span class="text-body min-w-0 break-all leading-[1.45]">{worktree.branch || "Not available"}</span>
</div>
<div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
<span class="text-caption">Location</span>
<span class="text-body min-w-0 break-all leading-[1.45]">{worktree.directory || "Not available"}</span>
</div>
</div>
)
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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Internationalize hardcoded tooltip strings.

The worktree tooltip contains hardcoded English strings ("Worktree", "Branch", "Location", "Not available") that should use the i18n system for consistency with the rest of the UI.

🌐 Proposed fix to use i18n

Add keys to en.ts and zh.ts:

"status.summary.git.worktree.tooltip.worktree": "Worktree",
"status.summary.git.worktree.tooltip.branch": "Branch", 
"status.summary.git.worktree.tooltip.location": "Location",
"status.summary.git.worktree.tooltip.notAvailable": "Not available",

Then update the tooltip:

 const worktreeTooltip = (worktree: ActiveWorktree) => (
   <div class="grid min-w-0 gap-1.5 py-1 text-left">
     <div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
-      <span class="text-caption">Worktree</span>
-      <span class="text-h3 min-w-0 break-all leading-[1.45]">{worktree.name || "Not available"}</span>
+      <span class="text-caption">{language.t("status.summary.git.worktree.tooltip.worktree")}</span>
+      <span class="text-h3 min-w-0 break-all leading-[1.45]">
+        {worktree.name || language.t("status.summary.git.worktree.tooltip.notAvailable")}
+      </span>
     </div>
     <div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
-      <span class="text-caption">Branch</span>
-      <span class="text-body min-w-0 break-all leading-[1.45]">{worktree.branch || "Not available"}</span>
+      <span class="text-caption">{language.t("status.summary.git.worktree.tooltip.branch")}</span>
+      <span class="text-body min-w-0 break-all leading-[1.45]">
+        {worktree.branch || language.t("status.summary.git.worktree.tooltip.notAvailable")}
+      </span>
     </div>
     <div class="grid min-w-0 grid-cols-[64px_minmax(0,1fr)] items-start gap-3">
-      <span class="text-caption">Location</span>
-      <span class="text-body min-w-0 break-all leading-[1.45]">{worktree.directory || "Not available"}</span>
+      <span class="text-caption">{language.t("status.summary.git.worktree.tooltip.location")}</span>
+      <span class="text-body min-w-0 break-all leading-[1.45]">
+        {worktree.directory || language.t("status.summary.git.worktree.tooltip.notAvailable")}
+      </span>
     </div>
   </div>
 )
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/app/src/components/session/session-status-summary.tsx` around lines
101 - 116, The tooltip component function worktreeTooltip (accepting
ActiveWorktree) uses hardcoded English strings; replace the literal labels
("Worktree", "Branch", "Location") and fallback text ("Not available") with i18n
lookups (e.g., t('status.summary.git.worktree.tooltip.worktree') etc.), and add
the corresponding keys to the locale files (en.ts and zh.ts) for those four
entries; ensure you import/use the same translation function used elsewhere in
this file/component so the tooltip text is localized at render time.

Astro-Han added 2 commits May 31, 2026 20:20
- Translate section titles to Chinese (环境/产出物) and fix English (Artifacts)
- Align GitRow to interactive row sizing (min-h 30px, px-2, conditional hover)
- Remove non-functional branch chevron (backend has no branch-switch API yet)
- Make changes row always clickable to navigate to review panel
Use grid layout (30px height, 16px icon + 1fr path + actions), IconButton
with Tooltip, folder-add-left icon, and row-hover-overlay/row-active-overlay
tokens matching session-turn-change-row CSS.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/app/src/components/session/session-status-summary.tsx (1)

287-295: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Gate artifact openFile/revealFile on local-server mode

openWorktreeDirectory gates on canOpenLocalPath(platform) && server.isLocal(), but ArtifactSection calls onOpenFile(file.path) / onRevealFile(file.path) and openFile/revealFile only check the platform method. The file.path values come from the server’s session.artifacts endpoint (Artifact.file is returned as file.path), so in remote-server mode this can pass remote filesystem paths to desktop shell APIs (platform.openPath / platform.showItemInFolder). Add the same server.isLocal() gating used for worktree directory.

   const openFile = (path: string) => {
-    if (!platform.openPath) return
+    if (!canOpenLocalPath(platform) || !server.isLocal() || !platform.openPath) return
     void platform.openPath(path).catch(() => {})
   }

   const revealFile = (path: string) => {
-    if (!platform.showItemInFolder) return
+    if (!canOpenLocalPath(platform) || !server.isLocal() || !platform.showItemInFolder) return
     void platform.showItemInFolder(path).catch(() => {})
   }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/app/src/components/session/session-status-summary.tsx` around lines
287 - 295, openFile and revealFile only check platform methods and can be passed
remote paths from ArtifactSection via onOpenFile/onRevealFile; mirror the gating
used in openWorktreeDirectory by requiring canOpenLocalPath(platform) &&
server.isLocal() before calling platform.openPath or platform.showItemInFolder.
Update the openFile(path: string) and revealFile(path: string) helpers to return
early if !canOpenLocalPath(platform) or !server.isLocal(), then call the
platform methods and retain the existing .catch(() => {}) behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@packages/app/src/components/session/session-status-summary.tsx`:
- Around line 287-295: openFile and revealFile only check platform methods and
can be passed remote paths from ArtifactSection via onOpenFile/onRevealFile;
mirror the gating used in openWorktreeDirectory by requiring
canOpenLocalPath(platform) && server.isLocal() before calling platform.openPath
or platform.showItemInFolder. Update the openFile(path: string) and
revealFile(path: string) helpers to return early if !canOpenLocalPath(platform)
or !server.isLocal(), then call the platform methods and retain the existing
.catch(() => {}) behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 52688ce0-ea4a-45b4-a942-e278570d0e32

📥 Commits

Reviewing files that changed from the base of the PR and between c598169 and defd761.

📒 Files selected for processing (3)
  • packages/app/src/components/session/session-status-summary.tsx
  • packages/app/src/i18n/en.ts
  • packages/app/src/i18n/zh.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/app/src/i18n/en.ts
  • packages/app/src/i18n/zh.ts

Astro-Han added 4 commits May 31, 2026 20:53
zh: 工作区 / 改动文件 (confirmed via DeepSeek + Codex consensus)
en: Workspace / Changed files
Unlike turn-change-row which sits inside a bordered container,
artifact rows are exposed directly in the status panel section.
Align GitRow and ArtifactRow with sidebar/settings convention:
rounded-md border-radius, hover:bg-surface-raised.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Application behavior and product flows enhancement New feature or request P2 Medium priority ui Design system and user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant