Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ LOGIN_RATE_LIMIT_GLOBAL_MAX="100" # Max failed login attempts instance-wide

« Aide » (`/help`, from the account menu) ships with the app, in French, English and European Portuguese. The articles are Markdown files in `app/features/help/content/{fr,en,pt-PT}/`, one per task, with a frontmatter block: `slug`, `title`, `summary`, `module`, `permission`, `keywords`, `related`, `order`. `permission` is the name of the `Permission` member the feature needs, several comma-separated when the feature opens to any of them, or `none`. `GroupLeader` among them opens the article to a group's overseer and assistant too, who hold no right for their group (`helpReaderFor` reads it from the account's record). A reader without it never sees the article, nor its search hits or links, and no permission is ever changed to show help.

A « ? » goes in the header's `help` slot (`<PageHeader help={<HelpEntryButton slug="…" />} />`, or `SettingsHeader`), which puts it at the far right of the top bar and at the end of the title's row on a phone. Its page and every layout with a loader above it export `skipRevalidationForHelpPanel as shouldRevalidate` from `~/features/help`, so opening the panel fetches the article only. A page that writes its own `shouldRevalidate` starts it with `if (onlyHelpPanelChanged(args)) return false`. The publisher record draws its own title row (`RecordHeader`), so it takes the « ? » twice: in `PageTopbar`'s `help` and in `RecordHeader`'s, which shows on a phone only. A page serving several rights may put a component of its own named `…Help` in the slot, choosing the article of the first right the reader holds (« Gérer le tableau »). The territory editor and « Créer en lot » do the same as the record: `TerritoryEditor` and `TerritoryBatchCreator` take a `help` for their column's title row.
A « ? » goes in the header's `help` slot (`<PageHeader help={<HelpEntryButton slug="…" />} />`, or `SettingsHeader`), which puts it at the far right of the top bar and at the end of the title's row on a phone. Its page and every layout with a loader above it export `skipRevalidationForHelpPanel as shouldRevalidate` from `~/features/help`, so opening the panel fetches the article only. A page that writes its own `shouldRevalidate` starts it with `if (onlyHelpPanelChanged(args)) return false`. The publisher record draws its own title row (`RecordHeader`), so it takes the « ? » twice: in `PageTopbar`'s `help` and in `RecordHeader`'s, which shows on a phone only. A page serving several rights may put a component of its own named `…Help` in the slot, choosing the article of the first right the reader holds (« Gérer le tableau »). The organigram's screens take it for their top bar and their heading (`OrgHeading`, phone only). The territory editor and « Créer en lot » do the same as the record: `TerritoryEditor` and `TerritoryBatchCreator` take a `help` for their column's title row.

`app/features/help/entry-points.test.ts` is the authoritative wiring: it scans the app source for every `<HelpEntryButton slug="…" />` and fails unless each one is pinned there and ships in every language. Keep this table in step with it.

Expand All @@ -450,6 +450,11 @@ A « ? » goes in the header's `help` slot (`<PageHeader help={<HelpEntryButton
| Campagnes | `/territories/attributions/campaigns` | `campaign-create` | `CanManageTerritoryCampaigns` |
| Prospection | `/territories/buildings` | `prospection` | `CanViewProspection` |
| Réglages › Territoires | `/settings/territories` | `territories-settings` | `CanConfigureTerritorySettings` |
| Réglages › Utilisateurs | `/settings/users` | `invite-user` | `CanManageUsers, CanManagePublishers` |
| An account, Réglages › Rôles et autorisations | `/settings/users/:id`, `/settings/roles` | `give-rights` | `CanManageUsers, CanConfigurePermissions` |
| Réglages › Import et export | `/settings/data` | `congregation-data` | `CanExportCongregationData, CanImportCongregationData` |
| Réglages › Journal d’audit | `/settings/audit-log` | `audit-log` | `CanConfigureCongregation` |
| Organigramme, Équipes | `/congregation/roles/organigram`, `/congregation/roles` | `organigram` | `CanManageRoles` |
| Mon compte › Profil | `/me/profile` | `calendar-feed` | none |
| Mon compte › Préférences | `/me/preferences` | `language` | none |
| Mon compte › Sécurité | `/me/security` | `password` | none |
Expand All @@ -465,7 +470,7 @@ A « ? » goes in the header's `help` slot (`<PageHeader help={<HelpEntryButton
| Activité › Rapports | `/publishers/activity` | `field-service-reports` | same |
| Activité › Pionniers | `/publishers/activity/pioneers` | `pioneers` | `CanViewActivity, CanManagePublishers` |

Articles without a « ? » are reached from the index, the search and related links only: `my-parts` (none: a person's parts show on the home page, the board and in e-mails, none of them a page of their own), `two-step-verification` (none: the Sécurité page's « ? » opens `password`, which links to it), `phone-territories` and `bano` (`CanConfigureTerritorySettings`), `board-download` (`CanViewBoard`), `board-versions` (`CanReviewBoardDocuments, CanUploadBoardDocuments`: the document history on `/board/documents/:id/edit`, which an uploader opens on the documents they uploaded), `emergency-roster` (`CanViewEmergencyInfo, CanManageEmergencyInfo, GroupLeader`: the roster is a button on the publishers list and the group page, whose « ? » open their own tasks), `activity-exports` (`CanViewActivity, CanRecordActivity`: Activité's « ? » opens the reports).
Articles without a « ? » are reached from the index, the search and related links only: `my-parts` (none: a person's parts show on the home page, the board and in e-mails, none of them a page of their own), `two-step-verification` (none: the Sécurité page's « ? » opens `password`, which links to it), `phone-territories` and `bano` (`CanConfigureTerritorySettings`), `board-download` (`CanViewBoard`), `board-versions` (`CanReviewBoardDocuments, CanUploadBoardDocuments`: the document history on `/board/documents/:id/edit`, which an uploader opens on the documents they uploaded), `emergency-roster` (`CanViewEmergencyInfo, CanManageEmergencyInfo, GroupLeader`: the roster is a button on the publishers list and the group page, whose « ? » open their own tasks), `activity-exports` (`CanViewActivity, CanRecordActivity`: Activité's « ? » opens the reports), `reset-two-step` (`CanManageUsers`: an account's « ? » opens `give-rights`, which links to it).

Each module in `app/features/help/model/help.type.ts` (`HELP_MODULES`) groups its articles under the label of its entry: the sidebar label, or « Mon compte » for `account`, listed last. Articles are read as data: the body is rendered on the server with raw HTML disabled, so an article cannot inject markup.

Expand Down
5 changes: 4 additions & 1 deletion app/features/congregation/routes/roles/organigram.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { redirect } from 'react-router'
import { loadOrganigramPage } from '~/features/congregation/server/organigram-page.queries'
import { OrganigramScreen } from '~/features/congregation/ui/OrganigramScreen'
import { HelpEntryButton } from '~/features/help'
import * as m from '~/i18n/paraglide/messages'
import { currentAccountContext, permissionsContext, withScopeFromContext } from '~/shared/auth/route-context.server'
import { Permission } from '~/shared/types/permission'
Expand All @@ -9,6 +10,8 @@ import type { Route } from './+types/organigram'

export const meta: Route.MetaFunction = () => [{ title: m.org_meta_title() }]

export { skipRevalidationForHelpPanel as shouldRevalidate } from '~/features/help'

export function loader({ request, context }: Route.LoaderArgs) {
const permissions = context.get(permissionsContext)
if (!permissions.has(Permission.CanViewRoles) && !permissions.has(Permission.CanManageRoles)) {
Expand Down Expand Up @@ -45,5 +48,5 @@ export async function action({ request, context }: Route.ActionArgs) {
}

export default function OrganigramRoute({ loaderData }: Route.ComponentProps) {
return <OrganigramScreen page={loaderData} />
return <OrganigramScreen page={loaderData} help={<HelpEntryButton slug="organigram" />} />
}
5 changes: 4 additions & 1 deletion app/features/congregation/routes/roles/role-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { type BuiltInFilterKey, toggleSchema } from '~/features/congregation/sch
import { loadTeamsPage, TEAMS_VIEWS } from '~/features/congregation/server/teams-page.queries'
import type { TeamToggleResult } from '~/features/congregation/ui/TeamCell'
import { TeamsScreen } from '~/features/congregation/ui/TeamsScreen'
import { HelpEntryButton } from '~/features/help'
import * as m from '~/i18n/paraglide/messages'
import { currentAccountContext, permissionsContext, withScopeFromContext } from '~/shared/auth/route-context.server'
import { holderOfMember } from '~/shared/domain/role-assignments.server'
Expand All @@ -16,6 +17,8 @@ import type { Route } from './+types/role-list'

export const meta: Route.MetaFunction = () => [{ title: m.teams_meta_title() }]

export { skipRevalidationForHelpPanel as shouldRevalidate } from '~/features/help'

export function loader({ request, context }: Route.LoaderArgs) {
const permissions = context.get(permissionsContext)
if (!permissions.has(Permission.CanViewRoles) && !permissions.has(Permission.CanManageRoles)) throw redirect('/')
Expand Down Expand Up @@ -71,5 +74,5 @@ export async function action({ request, context }: Route.ActionArgs) {
}

export default function TeamsRoute({ loaderData }: Route.ComponentProps) {
return <TeamsScreen {...loaderData} />
return <TeamsScreen {...loaderData} help={<HelpEntryButton slug="organigram" />} />
}
6 changes: 5 additions & 1 deletion app/features/congregation/ui/OrgHeading.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Plus } from 'lucide-react'
import type { ReactNode } from 'react'
import { Link } from 'react-router'
import * as m from '~/i18n/paraglide/messages'
import { Button } from '~/shared/ui/button'
Expand All @@ -8,13 +9,15 @@ interface OrgHeadingProps {
canCreate: boolean
/** « Nouveau rôle »: a link to the dialog, or what opens it here. */
newRole: { to: string } | { onClick: () => void }
/** The page's « ? », beside the title on a phone; the top bar carries it from md. */
help?: ReactNode
}

/**
* The organigram's title and subtitle. On a phone, « Nouveau rôle » is a « + » beside the title, as the shell's other
* phone headers carry their action, instead of a full-width button under it; from md up it stays in the top bar.
*/
export function OrgHeading({ canCreate, newRole }: OrgHeadingProps) {
export function OrgHeading({ canCreate, newRole, help }: OrgHeadingProps) {
return (
<div className="flex items-start gap-3">
<div className="flex min-w-0 flex-1 flex-col gap-1">
Expand All @@ -33,6 +36,7 @@ export function OrgHeading({ canCreate, newRole }: OrgHeadingProps) {
<Plus aria-hidden="true" />
</Button>
))}
<div className="shrink-0 empty:hidden md:hidden">{help}</div>
</div>
)
}
14 changes: 11 additions & 3 deletions app/features/congregation/ui/OrganigramScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Eye, Network, Plus } from 'lucide-react'
import { useCallback, useEffect, useRef, useState } from 'react'
import { type ReactNode, useCallback, useEffect, useRef, useState } from 'react'
import { Link, useSearchParams } from 'react-router'
import type { OrganigramPage } from '~/features/congregation/model/organigram-page.type'
import { AdoptCommitteeDialog } from '~/features/congregation/ui/AdoptCommitteeDialog'
Expand Down Expand Up @@ -30,7 +30,14 @@ interface NewRole {
parentId: number | null
}

export function OrganigramScreen({ page }: { page: OrganigramPage & { canManage: boolean } }) {
export function OrganigramScreen({
page,
help,
}: {
page: OrganigramPage & { canManage: boolean }
/** The page's « ? »: in the top bar from md, beside the title on a phone. */
help?: ReactNode
}) {
const { tree, panel, boardDocumentId, manage, canManage } = page
const [params, setParams] = useSearchParams()
const docked = useMediaQuery(DOCKED) === true
Expand Down Expand Up @@ -100,6 +107,7 @@ export function OrganigramScreen({ page }: { page: OrganigramPage & { canManage:
<PageTopbar
trail={[{ label: m.org_title() }]}
className="mb-0"
help={help}
actions={
<>
{boardDocumentId != null && (
Expand All @@ -119,7 +127,7 @@ export function OrganigramScreen({ page }: { page: OrganigramPage & { canManage:
</>
}
>
<OrgHeading canCreate={canManage} newRole={{ onClick: openNewRole }} />
<OrgHeading canCreate={canManage} newRole={{ onClick: openNewRole }} help={help} />
</PageTopbar>

<RolesTabs />
Expand Down
8 changes: 6 additions & 2 deletions app/features/congregation/ui/TeamsScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChevronDown, CircleAlert, CircleCheck, Plus } from 'lucide-react'
import { useState } from 'react'
import { type ReactNode, useState } from 'react'
import { Link, useSearchParams } from 'react-router'
import type { MatrixGroup, MatrixMember } from '~/features/congregation/model/role-matrix.type'
import type { BuiltInFilterKey } from '~/features/congregation/schemas/role.schema'
Expand Down Expand Up @@ -107,13 +107,16 @@ export function TeamsScreen({
views,
view,
canManage,
help,
}: {
groups: MatrixGroup[]
members: MatrixMember[]
counts: Record<number, number>
views: Record<BuiltInFilterKey, number>
view: BuiltInFilterKey
canManage: boolean
/** The page's « ? »: in the top bar from md, beside the title on a phone. */
help?: ReactNode
}) {
const [last, setLast] = useState<TeamToggleResult | null>(null)
const body = { groups, members, counts, canManage, onResult: setLast }
Expand All @@ -123,6 +126,7 @@ export function TeamsScreen({
<PageTopbar
trail={[{ label: m.org_title(), to: '/congregation/roles/organigram' }, { label: m.org_tab_teams() }]}
className="mb-0"
help={help}
actions={
canManage && (
<Button asChild size="sm" className="max-md:hidden">
Expand All @@ -134,7 +138,7 @@ export function TeamsScreen({
)
}
>
<OrgHeading canCreate={canManage} newRole={{ to: '/congregation/roles/organigram?new=1' }} />
<OrgHeading canCreate={canManage} newRole={{ to: '/congregation/roles/organigram?new=1' }} help={help} />
</PageTopbar>

<RolesTabs />
Expand Down
90 changes: 90 additions & 0 deletions app/features/help/content/captures.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@
"height": 71,
"captured": "2026-11-17"
},
"organigram-role-panel": {
"width": 398,
"height": 633,
"captured": "2026-11-18"
},
"pioneers-summary": {
"width": 644,
"height": 278,
Expand All @@ -140,11 +145,36 @@
"height": 210,
"captured": "2026-11-18"
},
"settings-account-roles": {
"width": 599,
"height": 435,
"captured": "2026-11-18"
},
"settings-account-security": {
"width": 596,
"height": 397,
"captured": "2026-11-18"
},
"settings-audit-toolbar": {
"width": 600,
"height": 104,
"captured": "2026-11-18"
},
"settings-bano": {
"width": 509,
"height": 208,
"captured": "2026-11-17"
},
"settings-data-export": {
"width": 596,
"height": 385,
"captured": "2026-11-18"
},
"settings-new-user": {
"width": 446,
"height": 338,
"captured": "2026-11-18"
},
"settings-phone-switch": {
"width": 473,
"height": 81,
Expand Down Expand Up @@ -302,6 +332,11 @@
"height": 71,
"captured": "2026-11-17"
},
"organigram-role-panel": {
"width": 398,
"height": 633,
"captured": "2026-11-18"
},
"pioneers-summary": {
"width": 644,
"height": 278,
Expand All @@ -322,11 +357,36 @@
"height": 210,
"captured": "2026-11-18"
},
"settings-account-roles": {
"width": 599,
"height": 415,
"captured": "2026-11-18"
},
"settings-account-security": {
"width": 596,
"height": 374,
"captured": "2026-11-18"
},
"settings-audit-toolbar": {
"width": 600,
"height": 104,
"captured": "2026-11-18"
},
"settings-bano": {
"width": 509,
"height": 208,
"captured": "2026-11-17"
},
"settings-data-export": {
"width": 596,
"height": 385,
"captured": "2026-11-18"
},
"settings-new-user": {
"width": 446,
"height": 318,
"captured": "2026-11-18"
},
"settings-phone-switch": {
"width": 473,
"height": 81,
Expand Down Expand Up @@ -484,6 +544,11 @@
"height": 71,
"captured": "2026-11-18"
},
"organigram-role-panel": {
"width": 398,
"height": 633,
"captured": "2026-11-18"
},
"pioneers-summary": {
"width": 644,
"height": 278,
Expand All @@ -504,11 +569,36 @@
"height": 210,
"captured": "2026-11-18"
},
"settings-account-roles": {
"width": 599,
"height": 435,
"captured": "2026-11-18"
},
"settings-account-security": {
"width": 596,
"height": 397,
"captured": "2026-11-18"
},
"settings-audit-toolbar": {
"width": 600,
"height": 104,
"captured": "2026-11-18"
},
"settings-bano": {
"width": 509,
"height": 208,
"captured": "2026-11-18"
},
"settings-data-export": {
"width": 596,
"height": 405,
"captured": "2026-11-18"
},
"settings-new-user": {
"width": 446,
"height": 338,
"captured": "2026-11-18"
},
"settings-phone-switch": {
"width": 473,
"height": 81,
Expand Down
24 changes: 24 additions & 0 deletions app/features/help/content/en/audit-log.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---

slug: audit-log
title: How do I find who did what in the audit log?
summary: The congregation’s sensitive actions, by person, action and period.
module: settings
permission: CanConfigureCongregation
keywords: audit log, audit, history, actions, sign-ins, rights, deletions, who did, traceability, security
related: congregation-data
order: 5
---

The audit log keeps the sensitive actions made in the congregation: sign-ins, rights, data, deletions. Each line says when, who, which action and on what.

## Find an action

1. In **Settings › Audit log**, choose the **Period**: the last 7 or 30 days, the last 3 or 12 months, **All time**, or **Chosen dates**.
2. For a person, type their name in the search. For a kind of action, choose it in **Action**.

![The audit log’s bar: the search, the action, the period and the number of actions](capture:settings-audit-toolbar)

3. Click a line to see its detail beside the list.

Actions made by the app itself, such as automatic tasks, show under **The app**.
Loading
Loading