feat(core): Add reusable record and mutation state helpers
Maintainers usually reply within 1 day
@spefalex is already working on this.
Since Sep 25, 2026.
Assessment
This issue has not been assessed yet.
Description
Context
libs/core/src/lib/resource-list.ts:18 provides list state only; apps/demo-material/src/app/pages/resource-edit-page.ts:82,94 manually implement record loads and writes. #48 fixes release correctness; this follow-up consolidates reusable APIs after observing that behavior.
Scope
- Add injectResourceOne accepting reactive resource/id and an explicit skip state, exposing loading/value/error/reload with latest-request ownership.
- Add typed create/update/delete helpers with pending/error/result state and a documented concurrency policy. Keep navigation, confirmation and UI notifications caller-owned.
- Migrate demos/generated code where APIs reduce duplicated lifecycle code; retain existing DataProvider compatibility.
Out of scope
Router integrations inside core, optimistic cache, batch mutations, transport cancellation required of every provider.
Acceptance criteria
- Tests cover skip, reactive identity, reverse-order promises, destruction, failed mutation/retry and concurrent calls.
- Public helper types reject invalid arguments without any.
- Demos/generated consumer behave identically and preserve #48/#42 browser regressions.
Notes for the dev
Touch core primitives/exports/tests and consumers. Depends on release correctness; do not delay 0.1.0 for this API.
Rules: no code comments, no any/$any; standalone components, signals and inject(). Core production imports only @angular/core and local core modules, never router/common/forms/UI. Other Pidrang libraries depend only on core, except @pidrang/cli-supabase which depends on @pidrang/cli as per the package graph in CLAUDE.md; apps compose adapters. Use conventional commits. For UI changes, validate with Playwright against pnpm exec nx serve demo-material and pnpm exec nx serve demo-tailwind; record tested paths and failures. Also validate generated UI in an external consumer fixture when affected.
Depends on
- #48
- #57
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 2
- Avg merge
- 9h 17m
- Merged PRs (30d)
- 48
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pidrang/pidrang
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
bug good first issue layer: library pkg: cli
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
good first issue layer: demo
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
good first issue layer: demo
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
good first issue layer: demo
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
Similar issues
-
normalizePropName strips `#` characters from Figma property names instead of only the `#id` suffixOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
figma/code-connect#419 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
jeanibarz/knowledge-base-mcp-server#1268 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Koenkk/zigbee-herdsman-converters#13820 ·
Maintainers usually reply within 2 days
-
A live recovery copy treats a large whole number and text with the same digits as the same valueOpenbug sharing & sync
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day