From ef99f04c5b690042059e43796d135401759cc20e Mon Sep 17 00:00:00 2001 From: "shumeiko.it" Date: Tue, 27 Oct 2026 12:54:54 +0100 Subject: [PATCH] fix(web): stop offering the Start here workspace twice on Home (UF-052) "Pick up where you left off" listed every recent workspace, including the one the Start here card already offers. The list now leaves it out and hides when nothing else is left. --- .../src/components/os/apps/HomeCockpit.tsx | 8 ++++-- apps/web/src/test/p2-home-desktop.test.tsx | 25 +++++++++++++++++++ docs/oss/upstream-fixes.md | 10 ++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/os/apps/HomeCockpit.tsx b/apps/web/src/components/os/apps/HomeCockpit.tsx index 6a8674a..a2b5bbf 100644 --- a/apps/web/src/components/os/apps/HomeCockpit.tsx +++ b/apps/web/src/components/os/apps/HomeCockpit.tsx @@ -796,6 +796,10 @@ const HomeCockpit = ({ onContinue, onOpenWorkspaceDesktop, onCreateWorkspace, us // payload has no sub — derive an honest one from the workspace + recency). const wsById = new Map(recentWorkspaces.map(w => [w.id, w])); const startHereMove = buildStartHereMove(briefing, wsById); + // Start here already offers its workspace; the list below shows the others (UF-052). + const otherRecentWorkspaces = startHereMove + ? recentWorkspaces.filter(w => w.id !== startHereMove.workspaceId) + : recentWorkspaces; const subForAction = (a: SuggestedAction): string | undefined => { const w = wsById.get(a.workspaceId); if (!w) return undefined; @@ -951,11 +955,11 @@ const HomeCockpit = ({ onContinue, onOpenWorkspaceDesktop, onCreateWorkspace, us - {recentWorkspaces.length > 0 && ( + {otherRecentWorkspaces.length > 0 && ( { void load(); }} - cards={recentWorkspaces} + cards={otherRecentWorkspaces} onContinue={onContinue} onOpenDesktop={onOpenWorkspaceDesktop} /> diff --git a/apps/web/src/test/p2-home-desktop.test.tsx b/apps/web/src/test/p2-home-desktop.test.tsx index 234da79..f0b51d5 100644 --- a/apps/web/src/test/p2-home-desktop.test.tsx +++ b/apps/web/src/test/p2-home-desktop.test.tsx @@ -157,6 +157,7 @@ describe('HomeCockpit (P2)', () => { it('scopes recent workspace card transitions to explicit properties', async () => { await renderHome(briefing({ recentWorkspaces: [ + { id: 'board', name: 'Board Update', group: 'Finance', summary: 'Variance narrative is half drafted.', lastActive: RAW_ISO, pendingCount: 5 }, { id: 'launch', name: 'Launch Plan', group: 'Marketing', summary: 'Three decisions still need review.', lastActive: RAW_ISO, pendingCount: 3 }, ], })); @@ -205,6 +206,30 @@ describe('HomeCockpit (P2)', () => { fireEvent.click(screen.getByTestId('home-cockpit-start-primary')); expect(onContinue).toHaveBeenCalledWith('launch', 'launch-session'); }); + + it('UF-052: does not offer the Start here workspace again in the recent list', async () => { + await renderHome(briefing({ + recentWorkspaces: [ + { id: 'eng', name: 'Eng', group: 'Product', summary: 'Sprint notes.', lastActive: RAW_ISO, pendingCount: 0 }, + { id: 'quiet', name: 'Quiet Research', group: 'Research', summary: 'Archived notes.', lastActive: '2026-06-09T09:00:00.000Z', pendingCount: 0 }, + ], + })); + + expect(screen.getByTestId('home-cockpit-start-here').textContent).toContain('Continue Eng'); + expect(screen.queryByTestId('home-cockpit-ws-eng')).not.toBeInTheDocument(); + expect(screen.getByTestId('home-cockpit-ws-quiet')).toBeInTheDocument(); + }); + + it('UF-052: hides the recent list when Start here already covers the only workspace', async () => { + await renderHome(briefing({ + recentWorkspaces: [ + { id: 'eng', name: 'Eng', group: 'Product', summary: 'Sprint notes.', lastActive: RAW_ISO, pendingCount: 0 }, + ], + })); + + expect(screen.getByTestId('home-cockpit-start-here')).toBeInTheDocument(); + expect(screen.queryByTestId('home-cockpit-recent')).not.toBeInTheDocument(); + }); }); // ── Workspace Desktop: error-state branching (P1b error contract) ────────── diff --git a/docs/oss/upstream-fixes.md b/docs/oss/upstream-fixes.md index c6f9634..f49aea2 100644 --- a/docs/oss/upstream-fixes.md +++ b/docs/oss/upstream-fixes.md @@ -80,6 +80,7 @@ Baseline: commit `b20b138` of `git.os-dev.tech/oleg.m/waggle-os`. | UF-049 | The workspace title stretches when switching tabs | Fixed | Web UI | | UF-050 | The chat activity card always claims memory, web and files | Fixed | Web UI, chat | | UF-051 | The memory recall step looks unfinished after the answer | Fixed | Sidecar, chat, memory | +| UF-052 | Home offers the same workspace twice | Fixed | Web UI | ## Entries @@ -515,3 +516,12 @@ Entries UF-010 to UF-019 come from the UI audit `anti-slop/audit-001-2026-10-14. - Cause: only the branch that finds memories sends a closing step ("Recalled N relevant memories."). The empty branch sends just a tool result, and a failed recall sends nothing. - What we did: the empty branch sends "No relevant memories found." and a failed recall sends "Could not search memory. Continuing without it." with an error tool result, and the turn goes on. A server test covers both cases and fails without the change. - Recommendation: apply the same change in the main project. + +### UF-052. Home offers the same workspace twice +- Status: Fixed +- Found: 2026-10-26 +- Where: at commit `b20b138`, `apps/web/src/components/os/apps/HomeCockpit.tsx:798` (the Start here move) and `:958` (the "Pick up where you left off" list) +- Symptom: the Start here card says "Continue Eng" with a Resume button, and the list right below it shows Eng again with its own Continue link. +- Cause: the list renders every recent workspace, including the one Start here already features. +- What we did: the list leaves out the Start here workspace and disappears when nothing else is left. Tests cover both cases. +- Recommendation: apply the same change in the main project.