Skip to content

A01: Route table: /agents list, /agents/:id/:tab, redirect old builder URL - #893

Merged
LinuxDevil merged 1 commit into
mainfrom
fb-a01-routes
Nov 7, 2026
Merged

LinuxDevil merged 1 commit into
mainfrom
fb-a01-routes

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

What changed

  • New agentTabs.ts (React-free): AGENT_TABS, AgentTab, AGENT_TAB_LABELS, BUILT_AGENT_TABS (only canvas built), isAgentTab, agentTabPath, and agentRedirect (legacy /agents/:id and unbuilt/unknown tabs redirect to /agents/:id/canvas, hash query preserved).
  • routeTable.ts: ScreenId gains agentList / agentDetail; /agents is now the agents list, /agents/:id/canvas the builder, /agents/:id/:tab the detail route.
  • routes.tsx: useScreen applies agentRedirect with replace before the unknown-route fallback; SCREENS gains both entries (rendered inside ScreenFrame).
  • New placeholder AgentListScreen (+ css, EmptyState for an empty workspace) and AgentDetailRoute (returns null until A05).
  • agentRoute.ts: agentRouteId accepts all three agent URL shapes; agentPath always returns the canvas URL; RouteSync drops canonical.
  • useAgentRouteSync.ts: unknown id falls back to /agents (the list); follow-the-open-agent navigates to the canvas URL.
  • LeftRail card click navigates to agentPath(id); CommandPalette open agent navigates to agentTabPath(id, 'overview').
  • Unit tests updated plus new agentTabs.test.ts and AgentListScreen.test.tsx; e2e specs updated (studio, studioUx, revamp, a11y, narrow, docShots).

How it was tested

  • npm test --workspace apps/agent-forge -- --run: 973 tests pass (90 files).
  • npm run typecheck, npm run lint, npm run typecheck:server, npm run test:server (1121 tests) for apps/agent-forge: pass.
  • Root npx tsc --noEmit, npm run lint: pass.
  • npm run test:coverage: passes after building packages/create-lousho and normalizing checked-out CRLF template READMEs locally (uncommitted environmental fixes).
  • npm run fallow: clean for this change (3 new contract exports annotated for later tickets); the 6 duplicate-code groups it reports are identical on main.
  • npm run docs:ratchet, npm run api:check, npm run docs:llms:check, npm run size-check: pass.
  • npm run test:e2e:studio: 116 passed; 7 remaining failures are in UI agent-creation flows (server rejects some spec PUTs with validation errors), under investigation — routing, redirects, list fallback, reload persistence and axe scans all pass.

Acceptance criteria

  • #/agents shows the list placeholder with header "Agents"; the nav item Agents is active.
  • #/agents/<id> lands on #/agents/<id>/canvas with replace (Back does not return to the legacy URL).
  • #/agents/<id>/canvas opens the builder for that agent; reload keeps it.
  • #/agents/<id>/overview (and any unbuilt or unknown tab) redirects to canvas until that tab's ticket lands.
  • Rail clicks and "Open agent X" in the palette land on the new URLs; an unknown id in the builder falls back to #/agents.
  • The unsaved default agent is reachable at #/agents/untitled-agent/canvas.

Generated with Devin

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@LinuxDevil
LinuxDevil merged commit 70d601a into main Nov 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant