Repository navigation
feat(regulations): add the Regolamenti section, procedure, diff and merge - #150
Draft
lorenzocorallo wants to merge 4 commits into
Draft
lorenzocorallo wants to merge 4 commits into
lorenzocorallo wants to merge 4 commits into
Conversation
…erge Regolamenti manages the governance documents (v1: the Raccolta dei Regolamenti Interni) against the backend's regulations.* contract (copied verbatim from PoliNetworkOrg/backend#110 as regulations.contract.ts): - Documenti, a document's versions and drafts, Bozze and Deleghe, in Italian. - Procedure page: states, transitions from the draft's `can`, the delibera, deadlines and "Emana e notifica" with its steps live; rettifica. - Members dialog (viewer, commenter, editor; any IdP account), the differences view (categories, then changed articles side by side with word marks) and the merge page with side-by-side conflict resolution. - regulations:read|write|manage|rectify permissions and middleware; a draft assignment or a delega alone admits a user to Bozze (regulations.me.get). - Agent mode: an in-memory fake with a local Hocuspocus and xelatex, the real RRI with REGULATIONS_DEV_LEGAL_DIR, and AGENT_BACKEND_TOKEN to call a local backend instead. - A reader of legal's LaTeX grammar for numbering and the fake. The editor page is a placeholder until the next pull request.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
…o check GitHub again Copies the contract from backend#117 (0249ba0) with can.emanateBlockedBy: the emanate action shows disabled with the backend's reason (a superseded base, text that doesn't parse, missing differences). An emanation step that has been running for 20 s offers "Controlla ora" (emanation.retry, valid while waiting).
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.
Regolamenti, part 1 of 2: the dashboard side of the regulations editor (spec decisions 5–13). Everything except the editor itself, which comes in the stacked follow-up.
What's in it
can; a blocked one stays visible and says why.regulations:read|write|manage|rectifyeach have their own middleware.loadAccessasksregulations.me.get, and they see Bozze only. The logo leads there.regulationsAssigneeMiddleware, because the backend owns per-draft access.regulations.contract.tsis a verbatim copy of feat(regulations): add the regulations.* contract and data model backend#110 (20ca321). Every response is parsed against it. Procedure names were confirmed with the backend thread (merge.execute, notapply).xelatex, development builds only. It is not in.output.REGULATIONS_DEV_LEGAL_DIRserves the real RRI and compiles it with legal's class and fonts.AGENT_BACKEND_TOKENsends a bearer token to a local backend, such as one from the backend's dev IdP shim.latex-structure.tsreads legal'sdocs/grammar.md(nesting capi, hierarchical numbers,\input). It parses legal's example and the migrated RRI (344 nodes) with no problems.FormDialogandCountgainlocale="it", andDateFieldgetsplaceholder. The bottom nav shortens Telegram when it shows eight services.Docs:
docs/regulations/README.md, plus README, AGENTS.md anddocs/design.md.Verified
pnpm check,pnpm typecheck,pnpm test(new tests: navigation and admission, the grammar reader) andpnpm build.AGENT_PERMISSIONS=none) lands on Bozze. Only Regolamenti is in the rail, and the list shows only their two drafts with their access.Verified end to end against the backend's local stack
Backend #115 (
feat/regulations-dev): Postgres, the real compile worker, Hocuspocus, and the dev IdP shim, seeded with the real RRI. One admin dev server per account, each withAGENT_BACKEND_TOKENminted for it.dev-editoranddev-delegatohave no permissions; the realregulations.me.getadmits them and sends them to Bozze.me.rectifiable) and gets an editable editor.merge.execute, and the result reachesdev-editor's open editor live.dev-direttivosends A to approval; the commenter's open editor turns read-only with an explanation.dev-segretariorecords the approval with the delibera; the delibera card and the 3-day deadline appear.dev-segretariocreates a delega todev-delegato; it is listed, with its toast.users.searchfinds "Paolo Presidente", who is then added to draft C.emanation.getbefore an emanation starts.Once
diff.*andemanation.*landed (backend #116, #117):rri-v2026.11.02, release, email, Telegram skipped; plus the 10-day opposition notice.dev-segretario:v2026.11.02through the merge page (source: version, no conflicts); resent, the diff showed only C's own change.rri-v2026.11.03, release, email. It finished after the backend's reload resumed it.dev-delegato: created fromv2026.11.03and fixed a typo in the live editor. "Emana rettifica" made tagrri-v2026.11.03.2, and the document page lists it as "Rettificato da Davide Delegato su delega del Segretario".can.emanateBlockedBy(contract re-copied from fix(esign): show signer matches only after typing, email under the name #117, 0249ba0).emanation.retry). This one was checked only in review: the fake GitHub resolves within a minute.Not verified
Do not merge without Lorenzo's OK. It depends on the backend's
regulations.*router.