diff --git a/packages/ui/src/components/instance/instance-shell2.tsx b/packages/ui/src/components/instance/instance-shell2.tsx index bd977dff..f5ca9a2c 100644 --- a/packages/ui/src/components/instance/instance-shell2.tsx +++ b/packages/ui/src/components/instance/instance-shell2.tsx @@ -1147,6 +1147,92 @@ const InstanceShell2: Component = (props) => { ) } + const renderStatusSessionChanges = () => { + const sessionId = activeSessionIdForInstance() + if (!sessionId || sessionId === "info") { + return ( +
+ {t("instanceShell.sessionChanges.noSessionSelected")} +
+ ) + } + + const diffs = activeSessionDiffs() + if (diffs === undefined) { + return ( +
+ {t("instanceShell.sessionChanges.loading")} +
+ ) + } + + if (!Array.isArray(diffs) || diffs.length === 0) { + return ( +
+ {t("instanceShell.sessionChanges.empty")} +
+ ) + } + + const sorted = [...diffs].sort((a, b) => String(a.file || "").localeCompare(String(b.file || ""))) + const totals = sorted.reduce( + (acc, item) => { + acc.additions += typeof item.additions === "number" ? item.additions : 0 + acc.deletions += typeof item.deletions === "number" ? item.deletions : 0 + return acc + }, + { additions: 0, deletions: 0 }, + ) + + const openChangesTab = (file?: string) => { + if (file) { + setSelectedFile(file) + } + setRightPanelTab("files") + } + + return ( +
+
+ {t("instanceShell.sessionChanges.filesChanged", { count: sorted.length })} + + {`+${totals.additions}`} + {`-${totals.deletions}`} + +
+ +
+
+ + {(item) => ( + + )} + +
+
+
+ ) + } + const renderPlanSectionContent = () => { const sessionId = activeSessionIdForInstance() if (!sessionId || sessionId === "info") { @@ -1233,6 +1319,11 @@ const InstanceShell2: Component = (props) => { } const statusSections = [ + { + id: "session-changes", + labelKey: "instanceShell.rightPanel.sections.sessionChanges", + render: renderStatusSessionChanges, + }, { id: "plan", labelKey: "instanceShell.rightPanel.sections.plan", diff --git a/packages/ui/src/styles/messaging/message-base.css b/packages/ui/src/styles/messaging/message-base.css index b9060a9e..dc3aa433 100644 --- a/packages/ui/src/styles/messaging/message-base.css +++ b/packages/ui/src/styles/messaging/message-base.css @@ -303,6 +303,16 @@ align-items: stretch; justify-content: space-between; gap: 0.5rem; + transition: background-color 0.2s ease, box-shadow 0.2s ease; +} + +.message-reasoning-header:hover { + background-color: var(--surface-hover); +} + +.message-reasoning-header:focus-within { + outline: none; + box-shadow: 0 0 0 1px var(--accent-primary); } .message-reasoning-toggle { @@ -331,12 +341,12 @@ } .message-reasoning-toggle:hover { - background-color: var(--surface-hover); + background-color: transparent; } .message-reasoning-toggle:focus-visible { outline: none; - box-shadow: 0 0 0 1px var(--accent-primary); + box-shadow: none; } .message-reasoning-label {