Story-1042: Forum settings functional + app-wide button motion system

Story 1042Epic None82 files · +93131/−859

PR #243 · pramaan-io/pramaan-app · merged 2026-06-06

How it flows

sequenceDiagram
  autonumber
  participant user as User
  participant shell as SettingsShell
  participant motion as MotionProvider
  participant api as Internal API
  user->>shell: open forums settings
  motion->>motion: init with reducedMotion=user
  shell->>user: header + toolbar + search render
  user->>shell: pick segment (All / Active / Archived)
  shell->>user: AnimatedList rows — firm editable, system read-only
  user-->>api: edit firm row → POST /api/internal/forums
  api-->>user: row animates exit, list reorders

Failures this PR kills

loading prop locks button — no double-press
canWrite guard separates firm vs system source
reducedMotion= user respects OS preference
tokens or primitives only — no hex codes
single button primitive enforced app-wide
auth and tenant boundary re-checked

Files changed (82)

File±
.claude/settings.json+5
.gitignore+5
.storybook/preview.ts+2 −1
.understand-anything/.understandignore+71
.understand-anything/fingerprints.json ★+36696
.understand-anything/knowledge-graph.json ★+53857
.understand-anything/meta.json+6
AGENTS.md+86 −10
design/v1/colors_and_type.css+2 −2
docs/notes/forums-wiring-map.md+0 −240
docs/walkthroughs/story-1042-button-hover.png+0
docs/walkthroughs/story-1042-button-loading.png+0
docs/walkthroughs/story-1042-walkthrough.html+219
eslint.config.mjs+4
messages/en.json+35 −1
messages/hi.json+35 −1
package.json+2
pnpm-lock.yaml+68
src/app/[locale]/(workspace)/layout.tsx+21 −26
src/app/[locale]/(workspace)/settings/AGENTS.md+170
src/app/[locale]/(workspace)/settings/audit/log/page.tsx+3 −31
src/app/[locale]/(workspace)/settings/catalogs/practice-areas/page.tsx+3 −1
src/app/[locale]/(workspace)/settings/firm/billing/page.tsx+2 −20
src/app/[locale]/(workspace)/settings/firm/grants/page.tsx+10 −30
src/app/[locale]/(workspace)/settings/firm/members/page.tsx+15 −32
src/app/[locale]/(workspace)/settings/layout.tsx+21
src/app/[locale]/(workspace)/settings/matter-configuration/filing-types/page.tsx+12 −22
src/app/[locale]/(workspace)/settings/matter-configuration/forums/page.tsx+2 −17
src/app/[locale]/(workspace)/settings/matter-configuration/matter-templates/[matterTemplateId]/page.tsx+4 −27
src/app/[locale]/(workspace)/settings/matter-configuration/matter-templates/page.tsx+4 −24
src/app/[locale]/(workspace)/settings/matter-configuration/matter-types/[matterTypeId]/page.tsx+0 −16
src/app/[locale]/(workspace)/settings/matter-configuration/matter-types/page.tsx+0 −16
src/app/[locale]/layout.tsx+20 −21
src/app/api/internal/forums/[forumId]/route.ts+72
src/app/api/internal/forums/route.ts+64
src/app/globals.css+10
src/components/app-chrome.tsx+5 −1
src/components/motion-provider.tsx+23
src/components/settings/audit-log/audit-log-page.stories.tsx+0 −4
src/components/settings/filing-types/filing-types-catalog-story-surface.test.tsx+1
src/components/settings/filing-types/filing-types-catalog-story-surface.tsx+0 −3
src/components/settings/filing-types/filing-types-catalog-toolbar.tsx+19 −40
src/components/settings/firm-profile/firm-profile-page.tsx+2 −10
src/components/settings/forums/forum-sheet.stories.tsx+50
src/components/settings/forums/forum-sheet.tsx+112
src/components/settings/forums/forums-catalog-page.stories.tsx+31 −24
src/components/settings/forums/forums-catalog-page.tsx ★+234 −32
src/components/settings/forums/forums-table.tsx+116 −15
src/components/settings/matter-types/filing-type-attach-sheet.test.tsx+11 −8
src/components/settings/matter-types/filing-type-attaches-story-surface.tsx+0 −3
src/components/settings/matter-types/matter-type-sheet-parts.tsx+13 −4
src/components/settings/matter-types/matter-types-story-surface.tsx+0 −3
src/components/settings/matter-types/participant-labels-story-surface.tsx+0 −3
src/components/settings/matter-types/proceedings-story-surface.tsx+0 −3
src/components/settings/members-roles/members-roles-page.stories.tsx+0 −4
src/components/settings/seats-and-billing/seats-and-billing-page.stories.tsx+0 −4
src/components/settings/settings-breadcrumb.stories.tsx+18 −23
src/components/settings/settings-breadcrumb.tsx+30 −13
src/components/settings/settings-search.stories.tsx+30
src/components/settings/settings-search.tsx+45
src/components/settings/settings-shell.stories.tsx+13 −44
src/components/settings/settings-shell.tsx+4 −17
src/components/settings/settings-sidebar.stories.tsx+13 −19
src/components/settings/settings-sidebar.tsx+24 −6
src/components/settings/settings-toolbar.stories.tsx+55
src/components/settings/settings-toolbar.tsx+31
src/components/settings/support-grants/support-grants-page.stories.tsx+0 −3
src/components/shared/animated-list.stories.tsx+67
src/components/shared/animated-list.tsx+57
src/components/shared/pagination.stories.tsx+50
src/components/shared/pagination.tsx+164
src/components/shared/primary-button.stories.tsx+18
src/components/shared/primary-button.tsx+50 −12
src/components/shared/segmented-filter.stories.tsx+42
src/components/shared/segmented-filter.tsx+111
src/components/ui/button.tsx+52 −9
src/components/ui/sheet.tsx+9 −6
src/lib/app-me.ts+9 −1
src/lib/forums/gateway.ts+73 −3
src/lib/kubb-client.ts+6
src/lib/matter-types/gateway.ts+3 −2
tests/unit/app-chrome.test.tsx+14 −2