Repository navigation
feat(activity): Activity journal on the redesign layout (#905) - #933
Merged
Merged
Conversation
) The redesigned Activity page reads "Fatou Ndiaye a créé la mitigation Bastion d'administration (PAM)" and filters by Risques, Incidents, Vulnérabilités, Mitigations, Preuves, Conformité and Rapports. The feed now gives it what that takes: - Each event names its domain and its object. The object is the record's title or name when the audit row carries it, else the name the summary quotes; ids and bare numbers are not names. - GET /timeline?domain=… filters by domain inside the query, so a filtered page is full rather than over-read and thinned. - Mitigations, reports and frameworks have no drawer and were shown only to audit-permission holders. They now follow the feed's own rule (you see an event if you may read what it is about), gated by the permission that guards their pages: mitigations:read, compliance:controls:read, reports:board:read. Governance records stay behind the audit permission. - Technical rows (onboarding celebrations, notification reads, unnamed routes) are left out of the journal for everyone; the audit trail keeps them. - One mutation recorded by both the HTTP middleware and the model hook shows once, from the model row that carries the record. - Actors read by display name when the user has one, email otherwise. Tests: journal Success / NotFound (unknown domain) / Unauthorized (per page permission), domain pushed into the query, twin merge, object labels, names. Existing timeline tests unchanged and green. Signed-off-by: alex-dembele <alexandredembele16@gmail.com>
The audit-chain repository, which every timeline reads in production, ignored AuditEventFilter.EntityTypes. The Activity page's domain filter came back unfiltered, and an entity timeline that asks for two names of one type (compliance_control and control) also matched any other type sharing the id. Incidents use sequential ids, so "incident 5" could pick up another type's row numbered 5. The older audit repository applied the list; the chain one now does too. The timeline unit tests use a fake that honoured the list, which is why they never failed; a repository test now covers it. Signed-off-by: alex-dembele <alexandredembele16@gmail.com>
The journal keeps the model hook's row of a mutation and drops the HTTP
middleware's twin. The model row can carry no actor, so incidents read
"OpenRisk a créé l'incident …" when a person had created them. The
actor now moves from the dropped twin onto the kept row. Approval
entries also name the request rather than the circuit step ("approve
step "Comité" of "Prolongation…""), and "submitted … for approval: X"
yields X.
Signed-off-by: alex-dembele <alexandredembele16@gmail.com>
…sign (#905) The organisation's journal as the mockup lays it out: title and subtitle, the Tout / Risques / Incidents / Vulnérabilités / Mitigations / Preuves / Conformité / Rapports pills (a server-side filter), entries grouped by day (Aujourd'hui, Hier, then the date) on a vertical rail, each with its avatar, the actor's name, the verb, the object in mono and the time on the right. System entries carry the OpenRisk mark. Older entries load when the end comes into view, or with the button. Each entry is one sentence ("Fatou Ndiaye a créé la mitigation Bastion d'administration (PAM)", "a changé le statut de la vulnérabilité …"), built from the event's domain, verb and object in fr/en. An object with a drawer opens it in place; others link to their page. The dashboard's recent-activity card now reads the same sentence. The previous page (W1-02 GlobalTimelinePage) and its create/update/ delete filter are replaced. The subtitle avoids the mockup's gendered "autorisée". Signed-off-by: alex-dembele <alexandredembele16@gmail.com>
GET /timeline and GET /entities/{type}/{id}/timeline were missing from
the contract. Both are now described with their shared paging and
filter parameters (cursor, limit, kind, actor_id, since, until), the
tenant feed's domain filter, and the TimelinePage / TimelineEvent
schemas, including domain and object. The description states who sees
what: drawer permission, page permission for mitigations, reports and
frameworks, audit permission for governance records. TS types
regenerated. Redocly reports the same 60 errors and 28 warnings as
before, none on these paths.
Signed-off-by: alex-dembele <alexandredembele16@gmail.com>
#899) Signed-off-by: alex-dembele <alexandredembele16@gmail.com>
This was referenced Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Sixth screen of the redesign epic (#899). Stacked on #932 (financial): the base is
feat/904-financial, so the diff shows only this issue.What changes for the user
Activity is now the organisation's journal from the mockup:
The dashboard's "Activité récente" card reads the same sentences.
Backend
/timelineevents carrydomainandobject, and?domain=filters inside the query. The object comes from the record's title or name when the audit row carries one, otherwise from the name the summary quotes. Ids and bare numbers are never shown as names.mitigations:read,compliance:controls:read,reports:board:read. Governance records stay behind the audit permission. Flagging it here because it touches who sees what.NamesByIDs), falling back to the email.GormAuditChainRepository, the one production reads, ignoredAuditEventFilter.EntityTypes. The domain filter came back unfiltered. The per-entity timeline asks for two names of one type (compliance_control+control), so it also matched any other type sharing the id. That matters for incidents, whose ids are sequential. Unit tests used a fake that honoured the list; a repository test now covers the real one.Verified
go test ./...: all packages pass. New tests:TestJournal_Success/_NotFound(unknown domain) /_Unauthorized(per-page permission).TestObjectLabel, names lookup.TestAuditChainList_FiltersByEntityTypes: it failed before the fix.npx tsc -b --noEmitclean, eslint clean on the touched files,npx vitest run115 files / 1041 tests. One run had a flake inshared/dsMenu, untouched here; it passed 3 times alone.?domain=incidentreturned 5 incidents (10 audit rows before the merge), each with its title and the person who created it./activity?drawer=incident&entity=5.Deliberate differences from the mockup
INC-2026-033,R-0115). Those references don't exist yet; the same gap applies on the risk register.Not done here
/timelineis not indocs/openapi.yamlat all. Documenting it is a separate docs task.Closes #905