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:
@@ -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}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user