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.
This commit is contained in:
shumeiko.it
2026-10-27 12:54:54 +01:00
parent b3b61e14c9
commit ef99f04c5b
3 changed files with 41 additions and 2 deletions

View File

@@ -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
<DreamDiaryCard />
</RevealSection>
{recentWorkspaces.length > 0 && (
{otherRecentWorkspaces.length > 0 && (
<RevealSection>
<RecentWorkspacesPanel
onWorkspaceChanged={() => { void load(); }}
cards={recentWorkspaces}
cards={otherRecentWorkspaces}
onContinue={onContinue}
onOpenDesktop={onOpenWorkspaceDesktop}
/>