Skip to content

feat(admin): add post resource store poc#2741

Open
Innei wants to merge 4 commits into
masterfrom
codex/admin-post-resource-store-poc
Open

feat(admin): add post resource store poc#2741
Innei wants to merge 4 commits into
masterfrom
codex/admin-post-resource-store-poc

Conversation

@Innei
Copy link
Copy Markdown
Member

@Innei Innei commented May 29, 2026

Summary

  • Add a normalized post/category resource store POC for admin UI state, including relation indexes and query-keyed list indexes.
  • Hydrate React Query transport results into the resource store while keeping business entities out of Query data; resource query hooks return only receipts/status.
  • Add a class-based optimistic transaction lifecycle for post mutations, including request success commit and error rollback.
  • Wire the resource store into real category management, category detail post lists, tag detail post lists, and the post write/edit page.
  • Use the transaction engine for post edit saves so list/detail projections receive optimistic updates and rollback on request failure.
  • Refactor resource-backed view components to self-consume store data by id/query key instead of receiving entity arrays through props.

Verification

  • rtk pnpm -C apps/admin run typecheck
  • rtk pnpm -C apps/admin exec vitest run src/data/post-category-resource/store.test.ts (9 tests; Vitest still prints the existing close-timeout warning)
  • rtk proxy git diff --check -- apps/admin/src/data/post-category-resource apps/admin/src/features/posts apps/admin/src/features/categories apps/admin/src/features/write/components/WriteRouteViewsContent.tsx
  • rtk pnpm -C apps/admin run build (passes with existing Vite/Rolldown warnings)

Known limitation

  • rtk pnpm -C apps/admin run lint could not run because the current worktree does not expose the oxlint binary: sh: oxlint: command not found.

@safedep
Copy link
Copy Markdown

safedep Bot commented May 29, 2026

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

Package Details
Package Malware Vulnerability Risky License Report
icon immer @ 11.1.8
apps/admin/package.json pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗

View complete scan results →

This report is generated by SafeDep Github App

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