Skip to content

Introduce getServerSession, add DB indexes, pagination and UI refinements#10

Open
aliamerj wants to merge 1 commit intomainfrom
codex/improve-performance-and-navigation-pdcuw1
Open

Introduce getServerSession, add DB indexes, pagination and UI refinements#10
aliamerj wants to merge 1 commit intomainfrom
codex/improve-performance-and-navigation-pdcuw1

Conversation

@aliamerj
Copy link
Contributor

Motivation

  • Centralize server-side session retrieval into a cached helper to avoid repeating auth.api.getSession and headers() across pages.
  • Improve query performance for feature and changelog screens by adding indexes and a migration.
  • Add pagination, loading states, and client-side navigation/UX polishing to multiple lists and dashboards.

Description

  • Added a cached helper getServerSession in lib/server/session.ts and replaced direct auth.api.getSession({ headers: await headers() }) calls across many server components with getServerSession() and concurrent Promise.all patterns.
  • Introduced DB indexes and a drizzle migration: added index definitions to db/schema.ts, created drizzle/0033_quick_perf_indexes.sql, and updated drizzle/meta/_journal.json.
  • Implemented pagination and counts for feature lists (public and project views) including server-side limit/offset and total-count queries, and updated FeatureList to support pagination controls.
  • Added loading skeletons: app/(dashboard)/projects/loading.tsx and app/(dashboard)/projects/[id]/loading.tsx.
  • Replaced several client-side animations and motion usages with simpler markup (removed motion/react-client in multiple components) and improved sidebar/navigation by switching to next/link and active-path detection in nav-main.tsx and nav-secondary.tsx.
  • Wrapped heavy analytics components with dynamic imports and Suspense fallbacks in app/(dashboard)/projects/[id]/page.tsx to improve load behaviour.
  • Fixed widget preview parsing and script loading by using next/script with safe JSON parse and explicit load strategies.
  • Minor bug fixes and UI tweaks such as correcting the support URL in app-sidebar.tsx and adding tag/status grouping in public roadmap rendering.

Testing

  • Ran a production build with next build successfully.
  • Ran type checks and linter via pnpm -w lint/pnpm -w typecheck and they passed.
  • Ran the test suite with pnpm test and unit/integration tests completed successfully.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant