Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

Phase 4: migrate Docs domain to live data contract#179

Merged
Shannon1980 merged 3 commits into
mainfrom
feat/docs-live-data-phase4-clean
Mar 13, 2026
Merged

Phase 4: migrate Docs domain to live data contract#179
Shannon1980 merged 3 commits into
mainfrom
feat/docs-live-data-phase4-clean

Conversation

@Shannon1980

Copy link
Copy Markdown
Owner

Summary

  • remove docs runtime dependence on mock-docs in docs page, docs API route, docs components, and docs UI config imports
  • add src/lib/docs/model.ts as the typed non-mock docs model (types + options/constants)
  • update /api/docs to return live DB/workspace data only (no seed fallback), with stronger error signaling
  • keep docs page UX (search/filter/sort/linking + queue/all tabs) while adding explicit load error/retry + clean empty states

What changed

Model layer

  • Added src/lib/docs/model.ts with docs domain types and UI constants (CATEGORY_OPTIONS, PRIORITY_OPTIONS, REVIEW_STATUS_OPTIONS).
  • Repointed docs components and ui-config to this live model module.

API layer

  • src/app/api/docs/route.ts no longer imports SEED_DOCUMENTS.
  • Removed seed-data fallback path; fallback is workspace docs only when DB is unavailable in local/dev.
  • API now surfaces schema/init and fetch failures as HTTP 500 JSON errors instead of silently injecting seed data.
  • Query now selects full docs contract fields (linked_to, version_history, priority, review_status, category, notes, assignments) and maps them through to response defaults.

UI layer

  • src/app/docs/page.tsx starts from empty state instead of SEED_DOCUMENTS.
  • Added robust loading/error/empty-state handling:
    • load error banner
    • queue/all tab error views when no data
    • retry action
  • Preserved existing UX controls and behavior for search/filter/sort/linking and review queue interactions.

Validation

  • npx eslint src/app/docs/page.tsx src/app/api/docs/route.ts src/lib/docs/model.ts src/lib/ui-config.ts
  • npm run lint currently fails due to pre-existing repo-wide lint errors unrelated to this PR (react-hooks/set-state-in-effect and other baseline issues in non-docs areas).

@vercel

vercel Bot commented Mar 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
claw-command Ready Ready Preview, Comment Mar 13, 2026 11:38pm

Request Review

@Shannon1980 Shannon1980 merged commit 9947ef5 into main Mar 13, 2026
4 checks passed
@Shannon1980 Shannon1980 deleted the feat/docs-live-data-phase4-clean branch March 13, 2026 23:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant