Conforms to the decisions through D104 (a draft). Written on 2026-11-13 in the team session on #457, #599 and #637; M1-05 added on 2026-11-17 on #458; M1-06 added on 2026-11-18 on #459; M1-07 added on 2026-11-18 on #460; M1-10 added on 2026-11-18 on #638; M1-11 added on 2026-11-19 on #650. Earlier M1 work on /users (M1-01 to M1-03) shipped as pull requests without a tab here.
- D3 (M1-04) · apps/web only composes /users. Who may suspend, reinstate, remove, revoke or restore is decided by Postgres; each row says what it offers through pool_members()'s and pool_invitations()'s
can_* columns, and a call made anyway is refused by its function.
- D7 and D29 (M1-04) · Every string is
t() with its Indonesian default and English in i18n/messages.en.ts. invitation_status and invitation_void_reason are labelled per language in i18n/enums.ts, with tones in lib/labels.ts. Kedaluwarsa and Dibatalkan sistem are page text, since neither is an enum value.
- D8 and D88 (M1-04) · Only @ui components and the tokens: Tabs for Anggota and Undangan, DropdownMenu for the row menus, Dialog for the confirms, sonner for the toasts.
- D10 (M1-04) · Refusals reach the user through
mapDbError(); invitation.not_voided and invitation.already_member get texts in lib/errors/texts.ts, and invitation.not_pending is worded for revoke and resend alike.
- D27 (M1-04) · Journeys first, in
apps/web/e2e, each title starting with the rule's ID.
- D10 (M1-09) · /welcome calls
assert_first_password() before Auth, and its refusal auth.password_already_set reaches the form through mapDbError().
- D3 (M1-05) · /master-data reads the five tables through PostgREST, filtered by the current pool's organization, retired rows included; every add, change, retire, restore and due-days change is an RPC in
lib/master-data/actions.ts. Who may write is decided by Postgres; the page only hides what the caller's permissions rule out.
- D7, D29 and D103 (M1-05) ·
vehicle_class, powertrain, transmission, service_type and lead_channel are labelled per language in i18n/enums.ts, neutral in lib/labels.ts; service_type follows D103's draft values.
- D10 (M1-05) · The nine
master_data.* keys have texts in lib/errors/texts.ts; a name or code held by a retired row says so and the form offers Aktifkan yang lama.
- D65 (M1-05) · A brand has one name in both languages; the other kinds show their Indonesian name where the English one is empty (R-MD-11, R-MD-34).
- D3 (M1-06) · The entities, pools, bank accounts, contract templates, organization settings and pool settings are read through PostgREST and written through their RPCs in
lib/master-data/actions.ts. A pool's own value is sent as a value, and Ikut organisasi as null (R-SET-21, R-SET-23).
- D7 and D29 (M1-06) ·
ride_platform is labelled per language in i18n/enums.ts, neutral in lib/labels.ts. A contract template is written in Indonesian alone, so its form has one name and one body in both languages (R-MD-50). The escalation hours show the notification type's code until per-type labels land (a carry-over).
- D10 (M1-06) ·
master_data.account_taken, in_use, last_active, template_active, timezone_invalid, settings.out_of_range, settings.warning_after_critical and settings.queue_hours_invalid have texts in lib/errors/texts.ts, worded per reason or field from the key's detail; master_data.code_invalid is one text, and each form's code hint names its format.
- D3 (M1-07) · Garages, insurers, their partner pairs, rental companies, checklist items and body panels are read through PostgREST and written through their RPCs in
lib/master-data/actions.ts; a rental company is retired and restored through retire_master_data() and restore_master_data(). Whether finance may write rental companies comes from caller_all_rental_companies() (R-MD-76).
- D7 and D29 (M1-07) ·
garage_kind, item_section, item_answer, item_applies_to and panel_area are labelled per language in i18n/enums.ts, neutral in lib/labels.ts (R-MD-79). A garage, an insurer and a rental company have one name in both languages (R-MD-72).
- D10 (M1-07) ·
master_data.pair_taken (with Aktifkan yang lama for a retired pair), phone_invalid naming its field, and out_of_range with a between variant when the detail has a max have texts in lib/errors/texts.ts.
- D3 and D97 (M1-10) · /profile composes what
delegable_permissions(), delegation_candidates() and pool_delegations() return and calls delegate_permission() and revoke_delegation() through lib/delegations/actions.ts. It does no time-zone math: the last day goes as a date, and the date picker's earliest day is pool_today (R-ACC-258).
- D7 and D29 (M1-10) · Profil, Delegasi and their fields are
t() with English in i18n/messages.en.ts; Aktif and Berakhir are page text from is_live, not an enum.
- D10 (M1-10) · The five new keys have texts in
lib/errors/texts.ts; access.reason_required shows next to Alasan. access.override_already_set and access.override_not_held are worded for an override or a delegation (R-ACC-238, R-ACC-260).
- D27 (M1-10) · /profile is not in
lib/nav.ts (R-APP-28): the page needs only a session, and the user card's Profil item opens it (R-APP-27). apps/web/AGENTS.md names it as the one exception.
- D3, D101 and D104 (M1-11) ·
invite_member() and resend_invitation() return delivery, and lib/invitations/actions.ts sends what it says: Auth's invite for invite, the sign-in link (signInWithOtp, shouldCreateUser: false) for sign_in. /auth/confirm takes type=magiclink too, then calls accept_invitation(): accepted lands on the landing page; voided or refused signs out and opens /auth/invalid with ?reason=<key>. Accepting after a password sign-in is a carry-over, not built.
- D10 (M1-11) · /auth/invalid shows the text of a known
reason key (invitation.not_found, invitation.expired, invitation.grant_not_held, invitation.scope_not_held) and its general message otherwise. Auth's over_email_send_rate_limit is page text, "Coba lagi dalam satu menit", since it is not a database key.
- R-TEN-32 (M1-11) ·
toPools() in lib/access/model.ts leaves out the rows whose pool_is_active is false, so the switcher, the current pool, the menu and /no-access follow (R-APP-29 to R-APP-31).
- D98 (M1-04) · A restore that comes back pending is sent by
lib/invitations/actions.ts as a resend; a failed send leaves it pending, and the row says so.
From the M1-04 Interface in the backend tab: built on the local stack, types generated.
pool_members(pool_id) with joined_at, can_suspend, can_reinstate, can_remove · the Anggota tab.
member_detail(membership_id) · the detail page, /users/[membership_id].
suspend_member(), reinstate_member(), remove_member() · the Anggota row menu, through lib/members/actions.ts.
pool_invitations(pool_id), revoke_invitation(), restore_invitation() and the enum invitation_void_reason · the Undangan tab, through lib/invitations/actions.ts.
add_* and change_* for vehicle_brand, vehicle_model, pricing_group, charge_type and lead_source, retire_master_data(), restore_master_data(), set_charge_type_due_days(), the enum service_type and the nine master_data.* keys · /master-data, from the M1-05 Interface (M1-05).
add_* and change_* for legal_entity, pool, company_bank_account and contract_template, set_organization_settings(), set_pool_settings(), the enum ride_platform and the eight new master_data.* and settings.* keys · /master-data, from the M1-06 Interface (M1-06).
add_* and change_* for garage, insurer, insurer_garage, rental_company, inspection_item_type and body_panel, caller_all_rental_companies(), the five enums above and master_data.pair_taken and phone_invalid · /master-data, from the M1-07 Interface (M1-07).
delegable_permissions(), delegation_candidates(), pool_delegations(), delegate_permission(), revoke_delegation(), the five new access.* keys and pool_members()'s ends_on, is_live and granted_by_name · /profile and the Ubah akses Sheet, from the M1-10 Interface (M1-10).
invite_member() and resend_invitation() returning sent_invitation with delivery, accept_invitation(), my_permissions()'s pool_is_active, organization_settings' service_interval_km_ev and _ice with set_organization_settings()'s matching arguments, and the local magic_link template "Undangan kembali ke Opleet" · from the M1-11 Interface (M1-11).
assert_first_password() · /welcome, through lib/auth/welcome.ts (M1-09).
- The invite template builds its link from
{{ .RedirectTo }}/auth/confirm; lib/invitations/actions.ts passes the origin from the server variable SITE_URL, never from a request header, or none so Auth uses its Site URL (#600, M1-09).
The rules on the Access page the journeys cite.
- Anggota · R-ACC-52, R-ACC-53, R-ACC-187 to R-ACC-189, R-ACC-195 to R-ACC-199, R-ACC-201, R-ACC-206, R-ACC-217, R-ACC-218 (
e2e/member-status.spec.ts); R-ACC-118 and R-ACC-119 (e2e/member-roles.spec.ts, now through suspend_member() and reinstate_member()).
- Undangan · R-ACC-204, R-ACC-207, R-ACC-211, R-ACC-216, R-ACC-220, R-ACC-222, R-ACC-271, R-ACC-273, R-ACC-286, R-ACC-287 (
e2e/invitations-tab.spec.ts).
- M1-05 · R-MD-11, R-MD-16, R-MD-24, R-MD-30, R-MD-31, R-MD-34, R-MD-35 and R-APP-05 for finance's Master data (
e2e/master-data.spec.ts), on the Master data page.
- M1-06 · R-MD-50, R-MD-51 and R-APP-25 for finance and viewer (
e2e/master-data.spec.ts, e2e/roles.spec.ts) on the Master data and App shell pages; R-SET-23 (e2e/master-data.spec.ts) on the Settings page.
- M1-07 · R-MD-51, R-MD-72, R-MD-73, R-MD-76, R-MD-77, R-MD-79, R-MD-82 and R-APP-25 (
e2e/master-data.spec.ts, e2e/roles.spec.ts) on the Master data and App shell pages. R-MD-78 has no journey, and R-MD-81 belongs to the modules whose pickers it names.
- M1-10 · R-APP-27 (
e2e/account-block.spec.ts, replacing R-APP-19) and R-APP-28 on the App shell page; R-ACC-254 to R-ACC-258 and R-ACC-263, the page half of each (e2e/delegations.spec.ts), and R-ACC-259 and R-ACC-262 (e2e/member-access.spec.ts) on the Access page. Berakhir has no journey, since an ended delegation can't be made through the API; pgTAP covers is_live. R-ACC-247 has no journey: the caller is never a candidate.
- M1-11 · R-ACC-92, R-ACC-189, R-ACC-265 to R-ACC-267, R-ACC-270 to R-ACC-274 (
e2e/invitations.spec.ts), R-ACC-228 (e2e/member-access.spec.ts) on the Access page; R-APP-15 (e2e/roles.spec.ts), R-APP-29 and R-APP-30 (e2e/account-block.spec.ts) on the App shell page; R-SET-12 (e2e/master-data.spec.ts) on the Settings page. R-APP-31 and R-MD-83 are unit tests (lib/access/model.test.ts, lib/errors/texts.test.ts): the organization keeps one active pool and every E2E login is at both.
- M1-09 · R-ACC-245 (
e2e/invitations.spec.ts); R-ACC-204, R-ACC-216 and, in part, R-ACC-207 for an expired invitation (e2e/invitations-tab.spec.ts); R-ACC-199, R-ACC-201 and R-ACC-216 for a holder of user:read alone (e2e/member-status.spec.ts).
A step is done when zuki has logged a clean run on its issue (D28).
- Anggota (the first tab) · the members at the current pool, filtered by status, one role and a search over name and email, all in the address (
?status, ?role, ?q). A row's menu offers Tangguhkan and Keluarkan on an active member and Pulihkan and Keluarkan on a suspended one; Tangguhkan and Keluarkan ask first, consequence first, and Pulihkan runs at once with a toast. The caller's own row has no menu. The name opens the detail page.
- Undangan (
?tab=invitations) · the pool's pending and voided invitations, newest sent first: email, role, who last sent it and when, and the status. Menunggu; Kedaluwarsa for a pending one past expires_at, compared with the time the page was read; Dibatalkan for a revoked one; Dibatalkan sistem with its reason for one voided at acceptance. The tab's name counts the invitations still waiting. A pending row offers Kirim ulang and Batalkan, a voided one Pulihkan. Batalkan asks first, naming the email (R-ACC-222). Pulihkan asks nothing and runs at once: the invitation is Menunggu again and a fresh link goes out the way restore_invitation()'s delivery says, a sign-in link for a confirmed login (R-ACC-286) and Auth's invite otherwise (R-ACC-220), with one toast for both (R-ACC-216, R-ACC-287). Nothing is restored until the link is accepted; a failed send shows next to the menu (R-ACC-105).
- Detail page (
/users/[membership_id]) · the member's name, email, status, joined date and roles by pool.
| Field |
Value |
| ID |
FE-M1-04 |
| Goal |
/users's Anggota and Undangan tabs and the detail page work on the local stack |
| Before |
pnpm supabase db reset with the M1-04 migrations; .env.e2e and apps/web/.env.local in place |
| Run |
pnpm --filter web build, then pnpm --filter web e2e e2e/member-status.spec.ts e2e/member-roles.spec.ts e2e/invitations-tab.spec.ts |
| Expect |
Every journey passes; as the E2E super_admin, /users shows both tabs in Indonesian, and in English after switching the language |
| Check |
Playwright's report; pnpm lint and pnpm typecheck |
| If it fails |
A refusal key in a failure points at the database: stop and ask be. A missing label or text fails typecheck first. |
| Undo |
Revert the change; the journeys clean up their own invitations and members |
| Level |
L0 |
| Runs |
|
- Tabs (
?tab=) · Merek, Model, Grup harga, Jenis tagihan and Sumber lead for a holder of master_data:read; Jenis tagihan alone for a holder of payment:approve without it (R-APP-05). Anyone else gets the Forbidden page.
- Lists · active rows by default; Tampilkan nonaktif adds the retired ones, marked Nonaktif (R-MD-30). A system row is marked Sistem and offers a writer without payment:approve no change (R-MD-35).
- Row menu · Ubah and Nonaktifkan for an active row, Aktifkan (at once) for a retired one, for a holder of master_data:write; Ubah jatuh tempo on a charge type for a holder of payment:approve (R-MD-16). Nonaktifkan asks first.
- Forms · one per kind, in a Dialog. Pickers list active rows plus the current value, so a retired brand leaves the model's brand picker (R-MD-30). A brand asks for one name (R-MD-34); a model is added from the brand picker (R-MD-24). A name or code a retired row holds is refused with a text that says so, and the form offers Aktifkan yang lama (R-MD-31).
- Language · in English a lead source with no English name shows its Indonesian one (R-MD-11).
| Field |
Value |
| ID |
FE-M1-05 |
| Goal |
/master-data's five tabs work on the local stack |
| Before |
pnpm supabase db reset with the M1-05 migrations; .env.e2e and apps/web/.env.local in place |
| Run |
pnpm --filter web build, then pnpm --filter web e2e e2e/master-data.spec.ts e2e/roles.spec.ts |
| Expect |
Every journey passes; as the E2E super_admin, /master-data shows the five tabs in Indonesian, and in English after switching the language |
| Check |
Playwright's report; pnpm lint and pnpm typecheck |
| If it fails |
A master_data.* key on a change a writer should be able to make points at the database: stop and ask be. A missing label or text fails typecheck first. |
| Undo |
Revert the change; nothing can be deleted (D65), so the brands and models the journeys add carry a run suffix and stay until the next reset; the due-days journey sets rent back to 3 days |
| Level |
L0 |
| Runs |
|
- Tabs · Entitas, Pool, Rekening bank, Template kontrak and Pengaturan join the M1-05 five for a holder of master_data:read. A holder of payment:approve without it gets Jenis tagihan and Rekening bank; a holder of payment:read alone gets Rekening bank, read-only, and Master data in the menu (R-MD-51, R-APP-25).
- Forms · Entitas, Pool (code and time zone on add only), Rekening bank (number shown in full) and Template kontrak (one name and one body, in Indonesian, R-MD-50; a change saves a new version and the form says which).
- Pengaturan · the organization's settings in groups, read-only without master_data:write; one escalation field per escalating notification type, blank for the 24-hour default.
- Pengaturan pool · a pool row's menu opens the pool's settings: each field shows the organization's value with Ikut organisasi until its switch is on; switching it off sends the pool back to the organization's value (R-SET-23).
| Field |
Value |
| ID |
FE-M1-06 |
| Goal |
/master-data's ten tabs and the pool settings work on the local stack |
| Before |
pnpm supabase db reset with the M1-06 migrations; .env.e2e in place |
| Run |
pnpm e2e:local e2e/master-data.spec.ts e2e/roles.spec.ts |
| Expect |
Every journey passes; as the E2E admin, /master-data shows the ten tabs, and a viewer sees Rekening bank alone |
| Check |
Playwright's report; pnpm lint and pnpm typecheck |
| If it fails |
"organization_settings failed" with code 42703 means the database is older than the migrations: reset it. A master_data.* or settings.* key on a change a writer should be able to make points at the database: stop and ask be. |
| Undo |
Revert the change; nothing can be deleted (D65); the pool settings journey puts E2B's settings back as they were |
| Level |
L0 |
| Runs |
|
- Tabs · Perusahaan rental, Bengkel, Asuransi, Item checklist and Panel bodi join the M1-06 ten for a holder of master_data:read. A holder of payment:read without it gets Rekening bank and Perusahaan rental (R-MD-51, R-APP-25); a holder of garage:write without it gets Bengkel alone, and Master data in the menu (R-MD-82).
- Perusahaan rental · finance adds, retires and restores when it holds every rental company of the organization; a viewer reads only (R-MD-76).
- Bengkel and Asuransi · garages are written by a holder of garage:write, insurers by a holder of master_data:write (R-MD-77). Each form asks for one name (R-MD-72); phone numbers are Indonesian.
- Bengkel rekanan · a garage's or an insurer's row menu opens its partners in a Dialog: the list with Rekanan sejak, Ubah tanggal mulai and Nonaktifkan / Aktifkan per pair, and Tambah rekanan, whose picker lists active rows not yet paired, never a retired one (R-MD-73).
- Item checklist and Panel bodi · a checklist item's section, answer and class and a panel's area read in the user's language (R-MD-79).
| Field |
Value |
| ID |
FE-M1-07 |
| Goal |
/master-data's fifteen tabs and Bengkel rekanan work on the local stack |
| Before |
pnpm supabase db reset with the M1-07 migrations; pnpm db:e2e-users; .env.e2e and apps/web/.env.local in place |
| Run |
pnpm --filter web build, then pnpm --filter web e2e e2e/master-data.spec.ts e2e/roles.spec.ts e2e/member-access.spec.ts e2e/invitations.spec.ts |
| Expect |
Every journey passes; as the E2E admin_fleet, /master-data shows Bengkel alone; as asuransi, a garage and an insurer are added and paired |
| Check |
Playwright's report; pnpm lint and pnpm typecheck |
| If it fails |
A master_data.* key on a change a writer should be able to make points at the database: stop and ask be. The invitation journeys send real emails, so they need SUPABASE_SECRET_KEY from apps/web/.env.local; without it each one stops at "Belum berhasil". |
| Undo |
Revert the change; nothing can be deleted (D65), so the garages, insurers and companies the journeys add carry a run suffix and stay until the next reset |
| Level |
L0 |
| Runs |
|
- First password once (R-ACC-245) · /welcome asks Postgres before it calls Auth; a login that already has a password is refused with "Akun ini sudah punya kata sandi. Masuk dengan kata sandi tersebut.", even when
password_set was cleared, and the old password still signs in.
- Expired invitation (R-ACC-204, R-ACC-216, R-ACC-207 in part) · a pending invitation past
expires_at is listed as Kedaluwarsa and still offers Kirim ulang and Batalkan.
- Read-only /users (R-ACC-199, R-ACC-201, R-ACC-216) · a holder of user:read alone sees the members, their detail page and the invitations, with no row menu and no action.
- Invite link (#600) · the invitation email's link is /auth/confirm on the address in
SITE_URL; the first journey in e2e/invitations.spec.ts opens the email's own link.
- Menus after D96 (R-APP-05) ·
e2e/roles.spec.ts expects D96's gate permissions: admin_driver, maintenance, asuransi and checker no longer show Admin Approval; admin_fleet shows Admin Approval and Gate In / Out; finance shows Gate In / Out.
| Field |
Value |
| ID |
FE-M1-09 |
| Goal |
The carry-over journeys pass on the local stack |
| Before |
pnpm supabase db reset with the M1-09 migrations, after a pnpm supabase stop and start for the invite template; .env.e2e and apps/web/.env.local in place; Playwright sets SITE_URL for its own server |
| Run |
pnpm --filter web build, then pnpm --filter web e2e e2e/invitations.spec.ts e2e/invitations-tab.spec.ts e2e/member-status.spec.ts e2e/member-access.spec.ts e2e/member-roles.spec.ts e2e/roles.spec.ts |
| Expect |
Every journey passes |
| Check |
Playwright's report; pnpm lint and pnpm typecheck |
| If it fails |
auth.password_already_set on a fresh invitee points at assert_first_password(): stop and ask be. An invite link to the wrong host points at the template. |
| Undo |
Revert the change; the journeys clean up their own invitations, members and overrides |
| Level |
L0 |
| Runs |
|
- Profil (R-APP-27, R-APP-28) · the user card's menu has Profil, then Keluar; /profile opens for every role by its address, titled Profil, with the member's name and login email, and is not in the menu.
- Delegasi (R-ACC-254, R-ACC-255) · admin_fleet and super_admin see the section at E2A, with its subtitle and "Belum ada delegasi di pool ini."; the checker sees none.
- Delegasikan (R-ACC-257, R-ACC-258, R-ACC-263) · the dialog offers the candidates without the caller and only the delegable approvals the caller holds; Berlaku sampai has the pool's today as its earliest day; a blank reason is refused with "Tulis alasan delegasi." next to Alasan; a saved one is listed with its last day and Aktif.
- Cabut (R-ACC-256) · asks first, revokes, signs the member out and empties the list; a delegation with no end shows —.
- Ubah akses (R-ACC-259, R-ACC-262) · a delegated override shows Delegasi and "Dari {giver} · sampai {date}", offers Hapus, and its permission is not offered in the add form.
| Field |
Value |
| ID |
FE-M1-10 |
| Goal |
The delegation journeys pass on the local stack |
| Before |
pnpm supabase db reset |
| Run |
pnpm e2e:local e2e/delegations.spec.ts e2e/member-access.spec.ts e2e/account-block.spec.ts (tools/team/e2e.sh recreates the e2e users, exports the local stack's keys, builds the app and runs Playwright) |
| Expect |
Every journey passes |
| Check |
Playwright's report; pnpm lint and pnpm typecheck |
| If it fails |
A refusal key on Delegasikan or Cabut points at the function: stop and ask be. A missing section points at delegable_permissions() or user:read at E2A. |
| Undo |
Revert the change; the journeys revoke every delegation at the E2E pools before each test and after the last |
| Level |
L0 |
| Runs |
|
- Invited again (R-ACC-265, R-ACC-267, R-ACC-273, R-ACC-274) · a removed member's invitation sends "Undangan kembali ke Opleet" with a /auth/confirm
type=magiclink link; opening it lands on /dashboard, and their old password still signs in.
- Revoked before opening (R-ACC-266, R-ACC-270, R-ACC-272) · Kirim ulang sends a third email; after a revoke the link opens /auth/invalid with "Undangan tidak ditemukan." and no session.
- Retired pool (R-APP-29, R-APP-30) · with E2B retired, the admin's current pool moves from E2B to E2A and the switcher lists E2A only; restored, both again.
- Service intervals (R-SET-12) · Pengaturan shows Jarak servis EV (km) and Jarak servis ICE (km), in place of the single field.
- Menus and labels (R-ACC-228, R-APP-15) · the four gate approvals have labels in the Izin list; finance has Persetujuan gate and the checker doesn't.
| Field |
Value |
| ID |
FE-M1-11 |
| Goal |
The re-invite and carry-over journeys pass on the local stack |
| Before |
pnpm supabase stop and start for the magic_link template, then pnpm supabase db reset |
| Run |
pnpm e2e:local e2e/invitations.spec.ts e2e/member-access.spec.ts e2e/roles.spec.ts e2e/account-block.spec.ts e2e/master-data.spec.ts, and pnpm --filter web test |
| Expect |
Every journey and unit test passes |
| Check |
Playwright's report; pnpm lint and pnpm typecheck |
| If it fails |
A link that lands on /auth/invalid after a clean send points at accept_invitation(): stop and ask be. An email with the invite subject for a removed member points at delivery. A pool that stays retired after a failed run: restore E2B in Master data, Pool. |
| Undo |
Revert the change; the journeys revoke their invitations and restore the pool they retire |
| Level |
L0 |
| Runs |
|