Skip to content

feat(dashboard): sync Learning Space tabs with URL params and add Suspense boundaries#496

Merged
GenerQAQ merged 1 commit intodevfrom
feat/dashboard-tab-url-params-and-suspense
Mar 26, 2026
Merged

feat(dashboard): sync Learning Space tabs with URL params and add Suspense boundaries#496
GenerQAQ merged 1 commit intodevfrom
feat/dashboard-tab-url-params-and-suspense

Conversation

@GenerQAQ
Copy link
Copy Markdown
Contributor

Why we need this PR?

Learning Space detail page tabs (metadata/skills/sessions) are not reflected in the URL, so users can't bookmark or share links to a specific tab. Also, several client components using useSearchParams lack <Suspense> boundaries, which triggers Next.js SSR warnings.

Describe your solution

  1. Tab URL sync: Replace useState for activeTab with useSearchParams/usePathname so the active tab is read from ?tab= and updated via router.replace. Default tab is skills (no param needed).
  2. Suspense boundaries: Wrap all client components using useSearchParams with <Suspense> to follow Next.js App Router requirements.

Implementation Tasks

  • Sync Learning Space detail tab state with ?tab= URL search param
  • Add <Suspense> to project/[id]/session/page.tsx
  • Add <Suspense> to project/[id]/session/[sessionId]/task/page.tsx
  • Add <Suspense> to project/[id]/learning-spaces/page.tsx
  • Add <Suspense> to project/[id]/learning-spaces/[spaceId]/page.tsx
  • Add <Suspense> to project/[id]/disk/page.tsx
  • Add <Suspense> to new/[id]/page.tsx
  • Add <Suspense> to new/page.tsx (extracted inner component)
  • Add <Suspense> to auth/layout.tsx (wraps login page children)

Impact Areas

  • Dashboard
  • Client SDK (Python)
  • Client SDK (TypeScript)
  • Core Service
  • API Server
  • CLI Tool
  • Documentation

Checklist

  • Open your pull request against the dev branch.
  • All tests pass in available continuous integration systems (e.g., GitHub Actions).
  • Tests are added or modified as needed to cover code changes.

…sing Suspense boundaries

Sync the active tab (metadata/skills/sessions) in the Learning Space detail page
with a ?tab= URL search parameter. Also add Suspense boundaries around all client
components that use useSearchParams to follow Next.js App Router best practices.
@GenerQAQ GenerQAQ requested a review from a team as a code owner March 26, 2026 03:23
@GenerQAQ GenerQAQ merged commit 3ae1a46 into dev Mar 26, 2026
1 check passed
@GenerQAQ GenerQAQ deleted the feat/dashboard-tab-url-params-and-suspense branch March 26, 2026 03:25
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