GeezerVison is showing github.com — feat(timeline): event-descriptor registry (WP-06 Slice 0a) by Storypapst · Pull Request #249 · OpenResilienceInitiative/ORISO-Frontend
Conversation
Storypapst
commented
Jun 23, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
WP-06 Activity Timeline — Slice 0a (Event-descriptor registry)
Additive foundation for the Activity Timeline. Introduces a single registry that turns a typed, text-free server record into a rendered timeline card, and wires it into NotificationsCenter to replace the generic bell + system/message tag with per-type icons and family labels.
What's in here
src/components/notificationsCenter/eventDescriptors/ — pure registry mapping event_type → { icon, family, category, i18n title/text template, resolveActionTarget(params) }.
types.ts, registry.ts, renderEventStrings.ts are pure (no React/SVG imports) and unit-testable in isolation; icons.tsx is the only file importing SVGs. tsc enforces icon-map completeness (Record<EventIconId, …>).
- Seeds all listed types: the 6 emitted today (
inquiry.accepted, message.new, thread.reply.new, supervisor.added/removed/assigned, counselor.renamed) plus descriptors for the designed families Requests, Messages, Drafts, Handover, Calls, System (Appointments deferred).
- Action-target rule = origin (per
CONTEXT.md): chat → conversation; request-origin → request view; draft → resume via forcedScopeKey; live call → Join. Targets are pure data — no navigation or call-stack wiring (deferred to Slices 4/5).
NotificationsCenter.tsx — now renders each card's icon/family/title/text from the descriptor. Every visible string comes from i18n templates client-side (ADR-AT-01: the server record is text-free). While the backend still sends title/text (pre-Slice-2), those are used only as the i18n defaultValue, so nothing regresses and no server-side rendered text is introduced.
- i18n —
notifications.events.* + notifications.families.* added to en and de; other locales fall back to de (FALLBACK_LNG).
- Tests —
cypress/e2e/eventDescriptors.cy.ts: a pure-logic spec covering every seeded type (family/category/icon/templates), the origin action-target kinds, fallback for unknown types, i18n key presence (en+de), and client-side rendering. Runs under the repo's Cypress harness.
CONTEXT.md — the Activity Timeline glossary referenced by the registry's code comments and the ADRs.
Scope guardrails (explicitly not in this slice)
- No global selection controller (that's Slice 0b, separate PR — this PR leaves
--active untouched).
- No backend migration of
event_notification (Slice 2), no Handover internals (Slice 4), no call events/join wiring (Slice 5), no Drafts section removal/encryption.
- No visual restyle beyond the additive per-type icon + family label the design requires.
Verification
npx tsc — 0 errors.
eslint on touched files — 0 errors (only pre-existing warnings).
CI=false npm run build — succeeds (the CI gate).
- Registry logic verified green (all assertions in the spec pass).
Refs: WP-06 Activity Timeline; ADR-AT-01 (Storage & E2EE boundary), ADR-AT-02 (stateful event model).
🤖 Generated with Claude Code
Summary by CodeRabbit
-
New Features
- Added a richer notifications timeline with standardized event types, categories, icons, and localized titles/texts.
- Notification items now display more specific labels and icons, with better handling for system and message events.
- Expanded language support for notification families and event messages in English and German.
-
Bug Fixes
- Improved fallback behavior for unknown or missing event types so notifications still render cleanly.
- Added logic to route notification actions to the most appropriate destination, including chat, requests, drafts, and calls.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Introduce a single registry mapping event_type -> { icon, family,
category, i18n title/text templates, resolveActionTarget(params) } for the
Activity Timeline. Replaces NotificationsCenter's generic bell +
system/message tag with per-type icons and family labels, and renders all
visible strings client-side from i18n templates (ADR-AT-01: the server
record is text-free; falls back to server title/text until the Slice 2
migration).
- Seeds the 6 emitted types (inquiry.accepted, message.new,
thread.reply.new, supervisor.added/removed/assigned, counselor.renamed)
plus descriptors for the designed families: Requests, Messages, Drafts,
Handover, Calls, System (Appointments deferred).
- Action-target rule = origin (chat -> conversation; request -> request
view; draft -> resume via forcedScopeKey; live call -> Join). Targets are
pure data; no navigation/call-stack wiring (deferred to Slices 4/5).
- Pure registry (no SVG/React imports) with a separate icon map; tsc
enforces icon-map completeness.
- en/de i18n templates + family labels (other locales fall back to de).
- Cypress unit spec covering all types, action-target kinds, icon ids and
i18n key presence.
- Adds ORISO-Frontend/CONTEXT.md (Activity Timeline glossary) referenced by
the registry and the ADRs.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
coderabbitai
Bot
commented
Jun 23, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Auto reviews are disabled on base/target branches other than the default branch.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8863e6fc-3a74-48bf-b333-7a1a3f35423d
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
feature/wp06-slice0a-event-descriptor-registry
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Storypapst
added a commit
that referenced
this pull request
Jun 24, 2026
…troller (WP-06 Slice 0 follow-up)
Closes two DoD gaps left by #249 (Slice 0a) and #250 (Slice 0b).
1. CI-enforced unit coverage. The registry and selection logic shipped as
cypress/e2e/*.cy.ts logic specs, which CI never runs (CI runs vitest via
`npm run test:unit`, scoped to src/**/*.test.{ts,tsx}) and which cannot run
bare. Port both to vitest specs next to their source so CI runs them; remove
the now-dead cypress duplicates.
2. Wire the Activity Timeline to the shared selection controller. The timeline
still chose its active card with a bespoke `selectedNotificationId === item.id`
flag instead of the route-derived controller. Add a pure `pickActiveItemKey`
helper to listItemSelection that yields exactly one active key (the route-active
conversation's card wins, else the in-page master-detail selection) and consume
it in NotificationsCenter. On the standalone /notifications route the route
selection is empty, so behaviour and visuals are unchanged — this only removes
the duplicated flag and unifies the source of truth.
No SCSS / visual changes (the active treatment already uses the shared list-item
mixins). tsc clean, eslint clean (pre-existing warnings only), vitest 113 passing,
production build OK.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
This was referenced Jul 18, 2026
This was referenced Jul 25, 2026
This was referenced Aug 1, 2026
Reviewers
shazia-k
Awaiting requested review from shazia-k
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|