[PR #13339] feat(app): Show a session's files changed in the session info (left sidebar) #14619

Open
opened 2026-02-16 18:19:24 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13339

State: open
Merged: No


closes #13337

What does this PR do?

Adds a "Files Changed" panel to the session hover card in the sidebar. When you hover over a session item, the existing messages preview is now displayed in a two-column layout — messages on the left, changed files on the right — so you can quickly see which files a session touched without opening it. The diff data is also prefetched in parallel with messages for snappier hover cards.

image

How did you verify your code works?

Checked that a session with changed files correctly shows changed files in the hover card
Checked that a session with no changed files shows "no files changed" in the hover card

Files Changed

File What Changed
layout.tsx Changed prefetchMessages to fetch messages and diffs in parallel using Promise.all([messages, diffs]). Diffs are stored in session_diff[sessionID] via globalSDK.client.session.diff().
sidebar-items.tsx Added "Files Changed" column to hover card reading from session_diff store.
hover-card.tsx Added size prop ("normal" | "large") for wider hover cards
hover-card.css Added max-width: 520px for data-size="large"
16 i18n files Added 3 translation keys: ui.sessionInfo.messages, ui.sessionInfo.filesChanged, ui.sessionInfo.noFilesChanged
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13339 **State:** open **Merged:** No --- closes **_#13337_** ### What does this PR do? Adds a "Files Changed" panel to the session hover card in the sidebar. When you hover over a session item, the existing messages preview is now displayed in a two-column layout — messages on the left, changed files on the right — so you can quickly see which files a session touched without opening it. The diff data is also prefetched in parallel with messages for snappier hover cards. <img width="820" height="399" alt="image" src="https://github.com/user-attachments/assets/379c5b66-221c-48d1-ac35-a0d61bed5886" /> ### How did you verify your code works? Checked that a session with changed files correctly shows changed files in the hover card Checked that a session with no changed files shows "no files changed" in the hover card ### Files Changed | File | What Changed | |------|--------------| | [layout.tsx](packages/app/src/pages/layout.tsx) | Changed `prefetchMessages` to fetch messages and diffs in parallel using `Promise.all([messages, diffs])`. Diffs are stored in `session_diff[sessionID]` via `globalSDK.client.session.diff()`. | | [sidebar-items.tsx](packages/app/src/pages/layout/sidebar-items.tsx) | Added "Files Changed" column to hover card reading from `session_diff` store.| | [hover-card.tsx](packages/ui/src/components/hover-card.tsx) | Added `size` prop (`"normal" \| "large"`) for wider hover cards | | [hover-card.css](packages/ui/src/components/hover-card.css) | Added `max-width: 520px` for `data-size="large"` | | 16 i18n files | Added 3 translation keys: `ui.sessionInfo.messages`, `ui.sessionInfo.filesChanged`, `ui.sessionInfo.noFilesChanged` |
yindo added the pull-request label 2026-02-16 18:19:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14619