151 Commits
Author SHA1 Message Date
adminandClaude Opus 5.5 9088b5c206 Fetch private dredd-core from the Haski Gitea, not GitHub
CI / backend (Postgres 17) (push) Successful in 5m10s
CI / managed Postgres (shared database, emulated, Postgres 17) (push) Successful in 4m20s
CI / backend (Postgres 16) (push) Successful in 5m11s
CI / editor-license (push) Successful in 1m21s
CI / one platform, one account (emulated, Postgres 17) (push) Successful in 1m40s
CI / compose-smoke (push) Successful in 2m17s
The Dockerfiles still rewrote credentials for github.com only, so the build
token never reached Gitea and installs worked only while dredd-core was
public. Rewrite http://77.216.148.202:3000/ instead, give every workflow
that pip-installs the same rewrite (org secret DREDD_CORE_TOKEN, the
read-only haski-reader token), and drop the GitHub PAT leftovers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 22:18:23 +01:00
ci-bot b9d2d80fbe ReaderJS: 89d1981 -> 2ed0ea6
CI / backend (Postgres 16) (pull_request) Successful in 6m27s
CI / managed Postgres (shared database, emulated, Postgres 17) (pull_request) Successful in 5m12s
CI / backend (Postgres 17) (pull_request) Successful in 5m55s
CI / one platform, one account (emulated, Postgres 17) (pull_request) Successful in 1m33s
CI / compose-smoke (pull_request) Successful in 1m30s
CI / editor-license (pull_request) Successful in 2m20s
CI / backend (Postgres 17) (push) Successful in 6m32s
CI / backend (Postgres 16) (push) Successful in 6m54s
CI / editor-license (push) Successful in 46s
CI / one platform, one account (emulated, Postgres 17) (push) Successful in 1m47s
CI / managed Postgres (shared database, emulated, Postgres 17) (push) Successful in 5m31s
CI / compose-smoke (push) Successful in 1m20s
Kaskada: Alpaq/ReaderJS main green on 2ed0ea63e67514209e29482308c2a24f7c2a7d51.
2026-11-30 15:54:27 +00:00
adminandClaude Opus 5.5 9af31a4ca6 CI: push runs only on main; branches are tested through their pull request [skip ci]
A push of many branches at once (the migration pushed 100 of Atrium's) started
a run per branch and flooded the runners. Every pull request is still tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 16:38:56 +01:00
adminandClaude Opus 5.5 8ac841dc7a CI: cascade/* branches run CI once, through their pull request
CI / backend (Postgres 16) (push) Successful in 5m51s
CI / backend (Postgres 17) (push) Successful in 5m54s
CI / one platform, one account (emulated, Postgres 17) (push) Successful in 2m5s
CI / managed Postgres (shared database, emulated, Postgres 17) (push) Successful in 5m37s
CI / editor-license (push) Successful in 2m44s
CI / compose-smoke (push) Successful in 2m56s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:38:55 +01:00
adminandClaude Opus 5.5 c1cd638308 CI: compose-smoke logs in with the session cookie
CI / backend (Postgres 16) (push) Successful in 4m27s
CI / backend (Postgres 17) (push) Successful in 3m49s
CI / managed Postgres (shared database, emulated, Postgres 17) (push) Successful in 3m52s
CI / one platform, one account (emulated, Postgres 17) (push) Successful in 1m34s
CI / editor-license (push) Successful in 38s
CI / compose-smoke (push) Successful in 54s
Since 1dd6b4a (Atrium#68 R2) the session is an HttpOnly cookie and the login
body carries no token, so the smoke test failed on "login returned no token".
It now keeps the cookie, asserts the body has no token, and calls /auth/me
with the cookie.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:41:25 +01:00
adminandClaude Opus 5.5 1fa8b1a6ec Build from Gitea instead of GitHub
CI / backend (Postgres 16) (push) Successful in 4m55s
CI / managed Postgres (shared database, emulated, Postgres 17) (push) Successful in 3m56s
CI / one platform, one account (emulated, Postgres 17) (push) Successful in 1m47s
CI / compose-smoke (push) Failing after 2m43s
CI / backend (Postgres 17) (push) Successful in 4m14s
CI / editor-license (push) Successful in 1m55s
The Alpaq92 GitHub account is suspended, so nothing can be fetched from it.
dredd-core (and Lexicon's compass packages from Arbiter) now come from the
public Haski repositories on Gitea, so CI no longer authenticates to GitHub:
the "Authenticate to dredd-core" steps and insteadOf rewrites are gone.
The Dockerfile's dredd_core_token build secret stays; any non-empty value
works now (the Haski org secret DREDD_CORE_TOKEN provides one in CI).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 17:05:20 +01:00
adminandClaude Opus 5.5 1dd6b4a724 No third-party code in Galena's origin, no session token in the console (Atrium#68, R2)
- ReaderJS, tesseract.js (+ WASM core, language models) and PDF.js are served by
  Galena from static/: backend/scripts/fetch_vendor.py fetches them at image build
  (Dockerfile `vendor` stage, Netlify prepare, local dev) - ReaderJS by full commit
  SHA through git, the npm tarballs at exact versions checked against their
  integrity hashes; a mismatch fails the build. tesseract.js was loaded as `@5`.
- The console and reader CSPs name no CDN; READERJS_DEFAULT_BASE is `dist/`, the
  shell-relative own copy (a remote, immutable override still works).
- POST /auth/login returns the raw session token only with `issue_token: true`
  (Galena Connect asks); the console signs in by the httpOnly cookie alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 16:40:25 +01:00
admin 73103e01e4 Merge pull request #20 from Alpaq92/fix/review-gate-combine-resolve
Review gate: Combine versions and Resolve discrepancies follow the review policy
2026-11-28 10:39:46 +01:00
admin 7e6a3fed96 Merge pull request #19 from Alpaq92/naprawa-53
Atrium#53: Galena's part of the repair plan (stages 1-3)
2026-11-28 00:21:59 +01:00
adminandClaude Opus 5.5 f59ec17fb4 CI hub stand-in creates the counterparty register; check it as writer; test the 0007 key drops
The platform job's next stop after the 0007 fix was 0014 (no dredd.counterparty: Atrium's 0012
creates it on a real platform). counterparty_alias leaves _LATER_TABLES again: it has no key to
app_user. Verified locally on PG16: platform job from scratch green, backend 638/18/0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 22:53:26 +01:00
adminandClaude Opus 5.5 ce553e7b64 0007: drop the local register's keys to app_user before the drop; seed workflow examples in the test; hold scramp below 1.5
Fixes Atrium#53 run 2, points 1, 2 and 7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 21:21:40 +01:00
adminandClaude Opus 5.5 42c0fa5bd7 feat(archive): withdraw a disposal request
A new append-only row (archive_disposal_withdrawal, in revision 0015 and
0007's person columns) by the requester or any other moderator, reason
required; 409 once disposed of. A withdrawn request no longer blocks a new
one, and approving it is 409 no_request. POST
/projects/{id}/archive/disposal/withdraw, audited archive.disposal_withdrawn;
console button Wycofaj wniosek on the card and in Likwidacje.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 15:30:52 +01:00
adminandClaude Opus 5.5 a3c2cef583 feat: the contract archive in Galena (Atrium#53 step 6)
Versioned packages per contract card (card snapshot + the modules' evidence
over GET /evidence, sha256-verified; Galena-stored items read locally at
their commit), manifest + fingerprint, append-only tables (revision 0015),
automatic archiving after document.signed / workflow.signed_on_paper with
ARCHIVE_READER_TOKEN and a "Do zarchiwizowania" retry list, manual archiving
by a moderator, retention from the live card per contract type, legal holds,
two-moderator disposal with a permanent protocol, ZIP export sealed by
Parafa, 409 archived_contract on deleting an archived project, and the
console screens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 13:22:56 +01:00
adminandClaude Opus 5.5 781c2a0683 feat: contract cards link to the counterparty register (Galena writes)
Spec 2026-11-25 part A, step 2. Galena is the register's second writer
(organisations only, through dredd-core link_or_create; a read-only
grant is a 409 counterparties_read_only). New document_card_counterparty
(card, counterparty RESTRICT, position, side) in revision 0014:
standalone the register's tables are this schema's own, on the platform
empty local copies are dropped and the key points at the hub's; ends
with runtime_grants_sql. The card keeps its text for what cannot be
linked. GET/POST /counterparties (picker, new organisation), PUT
/projects/{id}/card/counterparties (editor; no access 404). The list,
the CSV and the search show linked names, else the text; new filter
counterparty_id. One-off python -m app.link_counterparties (dry run,
then --commit) links only unambiguous single names via plan_import and
reports the rest.

Also: the card no longer links to Arbiter's console (Arbiter is
headless); the accepted analysis's date and version stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 20:05:01 +01:00
adminandClaude Opus 5.5 ff0c04acea fix: audit findings on the module-facing endpoints, cards and export
my_roles batches its node load and read filter; ProjectRolesIn moves to
schemas. A document's text is one service call that stops at MAX_CHARS
and MAX_PAGES. Dead apply_workflow_approved removed; one _actor helper;
_later reads naive times as UTC. Export loads all timelines in one query.
The Workflow banner navigates in-frame through workflowUrl. Ticket
narration trimmed from comments; behavioural tests added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 15:11:42 +01:00
Piotr ChojnackiandClaude Opus 5.5 cdc728e83a Review gate: Combine versions and Resolve discrepancies move versions by the policy's rules
* An editor could merge their working version straight into the main version of a project that
  needs approval with "Combine versions" (POST /projects/{id}/combine), which needed `editor` only:
  the review policy's whole promise, gone for anybody who can edit. The same route merged into
  someone else's working version, the source of their open draft, and POST /projects/{id}/versions
  could create that version in advance. `changes.assert_may_write_version` is the one rule for
  both routes: the main version of a `review_required` project is moved by an approver or a
  manager (D4: the approver role is the whole rule), someone else's `version/...` by a manager.
* "Resolve discrepancies" wrote around the write chokepoint: it published a draft that was already
  rejected or withdrawn, wrote any path it was handed (files nobody reviewed, committed under
  "Publish draft"), and committed an encrypted file's resolved text in plain text. It now needs an
  open draft, writes only the files the draft changes, encrypts under the file's mode (a passphrase
  file is refused, it cannot be encrypted without the passphrase), and the conflict picker shows
  the decrypted text instead of ciphertext. `git add` gets `--` before the path.

DB-free regression tests in tests/test_review_gate.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:56:46 +01:00
adminandClaude Opus 5.5 fd96cea5d9 feat: a document's text for the chat (Atrium#53, section 5)
GET /projects/{id}/text?path= answers a document's paragraphs (docx, odt,
rtf, pdf through pypdf, plain text), read as the caller with the file read's
access and decryption. Nothing is stored or indexed: the platform's chat asks
when a question is about a contract's content. Capability 'document_text'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 19:10:47 +01:00
admin 4bda7cda61 Merge remote-tracking branch 'origin/feat/roles-for-modules' into naprawa-53 2026-11-25 19:02:45 +01:00
admin c23c4398e6 Merge remote-tracking branch 'origin/feat/card-accepted-analysis' into naprawa-53 2026-11-25 19:02:43 +01:00
admin d4ff484732 Merge remote-tracking branch 'origin/feat/card-status-events' into naprawa-53
# Conflicts:
#	.env.example
#	backend/app/config.py
2026-11-25 19:02:42 +01:00
admin 77c2d45768 Merge remote-tracking branch 'origin/feat/send-for-approval' into naprawa-53 2026-11-25 19:02:18 +01:00
adminandClaude Opus 5.5 6b858b0209 feat: the caller's roles and a document's role holders, for the other modules
Workflow already calls POST /projects/roles (may this person read these
documents?) and GET /projects/{id}/holders?min_role= (who does a role stage
go to?), and Parafa needs the first; Galena answered neither, so a Workflow
run on a Galena document could not be read or routed. Both answer about the
caller only (the person's token), through dredd-core's effective_role:
roles name null for anything unreadable or not a project (at most 200 ids),
holders is a 404 unless the caller may read the project. Advertised as the
capability "project_roles". Atrium#53, found while fixing Parafa (stage 3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 13:56:38 +01:00
adminandClaude Opus 5.5 bd823ee6e7 fix(export): a run whose repository or commit is gone is skipped, not fatal
From review: git_facade.all_files sat outside the try, so one such run
ended the whole export instead of becoming a skipped line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 12:40:15 +01:00
admin d5f0be37cf Merge branch 'feat/card-status-events' into feat/card-accepted-analysis
# Conflicts:
#	backend/app/services/events.py
2026-11-25 12:39:40 +01:00
adminandClaude Opus 5.5 29007cb468 fix: an event's module 'galena' is Galena's, whatever this deployment's slug
From review: Workflow's payload carries DocumentRef.module, the constant
'galena', while the check compared it to MODULE_SLUG, which is configurable;
under another slug every Workflow event (workflow.approved included) was
ignored. Both names are accepted now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 12:39:15 +01:00
adminandClaude Opus 5.5 d037eefdab fix: the card's newer acceptance is judged as a time, not as text
Comparing isoformat() strings sorts wrong when two timestamps carry
different offsets (a session TimeZone changed between them), so a late,
older analysis.accepted could replace a newer one. Found in review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 12:36:54 +01:00
adminandClaude Opus 5.5 ec927a8923 feat: the contract card keeps the analysis accepted in Arbiter
Arbiter now says `analysis.accepted` when a lawyer accepts an analysis
(Atrium#53, stage 2). Galena hears it from ANALYSIS_EVENT_ROLES (default
arbiter_app) and, for a Galena document, stores the latest accepted analysis
on the card (`document_card.accepted_analysis`, revision 0013): ids and
hashes only, as the event carried them, each checked. A late older event
never replaces a newer acceptance, and the card's status does not move.
One audit entry per change. The card shows the date, the document version
and, on the platform, a link to the analysis.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:30:19 +01:00
adminandClaude Opus 5.5 3cc4a7079b feat: the contract card follows signing, negotiation and paper-signature events
Atrium#53: Galena is a service under the other modules, so the card's status
follows what they report, forward only, never over a status set later:

- workflow.approved          szkic|negocjacje            -> zatwierdzona (as before)
- workflow.signed_on_paper   szkic|negocjacje|zatwierdzona -> podpisana
- document.signed (Parafa)   szkic|negocjacje|zatwierdzona -> podpisana
- negotiation.round_received (Agora)  szkic -> negocjacje

One table (cards.EVENT_MOVES) and one move (cards._move) replace the approval-
only path; the stamp names its source (obieg / podpis / negocjacje) and the
card shows it. Each kind is trusted only from its module's role
(WORKFLOW_EVENT_ROLES, new SIGNING_EVENT_ROLES=parafa_app,
NEGOTIATION_EVENT_ROLES=agora_app); an event about a file, a request or another
module's document is ignored.

Not run here: no Python or Node on this machine and CI is not running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 08:13:50 +01:00
adminandClaude Opus 5.5 abe5c3324c feat: Send for approval on a file opens the Workflow module
Atrium#53 moves approval runs to Workflow and takes Galena out of the menu,
so the document is sent from where people work on it. The file menu gets
"Send for approval" ("Wyślij do akceptacji"): it opens Workflow's new-run
screen with this project and path chosen, as a sibling path (../workflow/,
like the hub link), so it is right under any prefix and Atrium's frame
follows it. Only on the platform (hubMode) and only on main, because Workflow
pins the file as it is on main.

Not run here: no Python or Node on this machine and CI is not running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 07:47:42 +01:00
adminandClaude Opus 5.5 3f2e5135b6 feat: approval runs move to Workflow — drain here, export the finished ones
Atrium#53 makes Workflow the one approval engine. This is the first of the
two Galena steps (the second removes the engine's code; its tables stay).

- LEGACY_WORKFLOWS=drain (default): starting a run and changing a template
  answer 409 moved_to_workflow, before any read; runs in progress still
  approve / reject / cancel / scan as before. No example templates are seeded.
  `open` restores the old engine; its integration tests use it.
- The document's workflow page shows a banner linking to Workflow, and no
  start button (can_start is false while drained).
- python -m app.export_workflows [--out file]: read-only export of templates
  and FINISHED runs with their timelines. Each run is pinned to the project's
  main file at its commit (one file outside podpisane/ and hidden paths), with
  that file's last commit and the sha256 of its decrypted bytes — the same
  hash dredd-core's pin_document computes, so Workflow reads it back cleanly.
  Several files, none, a removed project or a passphrase-encrypted one: the
  run is exported with subject null and a reason. Runs in progress are listed,
  not exported (exit 1); export again once they finish.
- WORKFLOW_EVENT_ROLES defaults to workflow_app (the Workflow module's role),
  not the retired compass_app: without it the contract card ignores Workflow's
  approvals.

Not run here: no Python or Node on this machine and CI is not running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 23:12:57 +01:00
adminandClaude Opus 5.5 1138421e05 Approval workflows (Obiegi akceptacji): move Workflow's multi-stage approval into Galena
Templates of ordered stages, runs pinned to a commit, approve/reject/cancel with optimistic checks,
an append-only timeline, paper signature by scan through apply_change, the card moves to
zatwierdzona via register_sources, Waiting for me / In progress lists and a /stats tile. Revision
0012 (idempotent, runtime grants re-run); 0007 learns the new person columns and the user ids inside
stages. Seeds Workflow's three example templates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 14:09:56 +01:00
admin 8ba4e06c18 Merge pull request #13 from Alpaq92/feat/m4-stats
GET /stats: Galena answers dredd-core's stats contract (M4)
2026-11-12 23:32:19 +01:00
adminandClaude Opus 5.5 bc98681e43 Repin dredd-core to v0.23.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 22:25:49 +01:00
adminandClaude Opus 5.5 7c78c128bd GET /stats: Galena answers dredd-core's stats contract (M4, Panorama's tiles)
Two tiles, each counted for the caller by the very function its list calls:
contracts (cards.listing with no filter, through cards.readable_count; #/cards)
and drafts (changes.drafts_for_user; #/drafts). Behind the session like every
route, so Panorama's call with the person's own token sees exactly that
person's numbers. The integration test checks tile == list for an
administrator, a viewer of one workspace and a stranger.

dredd-core is pinned to the feat/m4-stats commit (f170334) until v0.23.0 is
tagged; repin then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 21:52:53 +01:00
adminandClaude Opus 5.5 bd78c57247 K1: module events (dredd-core 0.20.0)
apply_change emits document.version_added in the write's transaction; a
receiver loop applies workflow.approved to document_card.lifecycle with a
register_sources stamp (zrodlo obieg), idempotent per event. Revision 0011
creates the cursor and receipt tables, and standalone the log itself;
on the platform the log is the hub's. Backups leave the shared event
tables out on the platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 09:46:12 +01:00
adminandClaude Opus 5.5 60437b1399 R3: the contract card in Galena (document_card, register, CSV export, expiry alerts)
Split plan 2026-11-06, WP-R3. A document of type umowa gets a 1:1 card
(number UM-<year>-NNNN, parties, amounts, dates, lifecycle with
zatwierdzona per D5, signatories, representatives, register_sources,
custom fields). Register list with filters, sorts and the Kolumny panel,
CSV export on Compass's Excel rules, expiring alerts at 60/30/7 days.
custom_fields and table_views come from dredd-core 0.19.0.

Revision 0010 is idempotent; 0007 skips the two tables 0010 creates when
a pre-0007 database is cut over to the platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:37:45 +01:00
adminandClaude Opus 5.5 8966297795 dredd-core 0.19.0: /raw on the shared plain_files rule (R2)
Repin dredd-core to v0.19.0. /raw takes its media type and headers from
dredd_core.plain_files.response_headers, so the untrusted-bytes rule
(allowlisted inline media, everything else octet-stream + sandbox CSP +
nosniff) lives in one place. Core's INLINE_MEDIA equals Galena's old set
and the CSP is byte-identical; filenames gain RFC 5987 filename*.
test_raw_headers pins PNG/HTML/SVG/download and fails if core ever widens
the inline set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 00:06:35 +01:00
adminandClaude Opus 5.5 9e18f8e7b5 dredd-core 0.18.1: walk routes through iter_routes
FastAPI 0.15x keeps each included router as one _IncludedRouter entry, so
the console wrapper (404 instead of 405 + Allow) and the route sweeps would
see no API route. Repins core from v0.17.0; FastAPI itself stays 0.115.6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:44:43 +01:00
adminandClaude Opus 5.5 6a3857ede6 Route encrypt and move-file through apply_change; allow approving own draft
Ported from Compass #51 (plan WP R1):
- encrypt reads the author's working version when there is one, so it no
  longer overwrites their edits with main; audited as file.encrypt
- move-file goes through the review policy; crypto.move_marker carries the
  encryption marker to the new path; audited as file.move
- flush after closing a draft (publish, resolve, reject, withdraw), so the
  next submit does not reopen it
- D4: an approver may publish or reject their own draft

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 11:25:24 +01:00
admin cfad9582a8 Revert "Merge pull request #12 from Alpaq92/feat/galena-last"
This reverts commit e3f7258bc2, reversing
changes made to 86d5e5e048.
2026-11-06 14:56:26 +01:00
admin e3f7258bc2 Merge pull request #12 from Alpaq92/feat/galena-last
Last release: moved to Compass, retire the worker at /galena/
2026-11-06 14:15:46 +01:00
adminandClaude Opus 5.5 3d4a6da475 Last release: moved to Compass (Dokumenty), retire the worker at /galena/
The service worker unregisters itself only under /galena/, so a standalone
deployment keeps its web push. README says where the drive went.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 14:15:38 +01:00
adminandClaude Opus 5.5 86d5e5e048 Console: inline handlers take values through jsq(), not esc() alone (XSS)
The browser decodes an attribute's entities before it compiles onclick="…", so esc()'s &#39;
was a quote again by then: a file, folder, version or plugin named x');alert(1);(' ran code in
Galena's origin — on the platform, the whole family's. jsq() makes the value a JSON string
literal first, then escapes it for the attribute; encodeURIComponent, which leaves ' alone, is
wrapped too. test_console_handlers.py allows only server ids inside a quoted literal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 16:22:17 +01:00
adminandClaude Opus 5.5 7c792914a9 Let /upload take the passphrase header, and mark a missing passphrase machine-readably
Desktop clients save binary documents through /upload, which took no passphrase, so a
passphrase-encrypted DOCX could be opened but never saved back. The header (never a query
parameter) now reaches apply_change. A missing passphrase answers 422 with
code=passphrase_required, so a client can ask and retry instead of failing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
galena-pre-absorb
2026-11-03 10:17:42 +01:00
adminandClaude Opus 5.5 56a7595936 Repin dredd-core v0.17.0: the shared search contract
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 11:03:55 +02:00
adminandClaude Opus 5.5 345e06d575 window.applyLang: switch the console's language in place for the platform
Atrium calls frame.win.applyLang(lang) when its language changes. The hook accepts en|pl only,
is a no-op on the current value (no storage-event loop with Atrium), persists galena_lang, sets
<html lang>, re-localizes from the English source and tells an open ReaderJS viewer. Only Settings
is re-rendered; editors, the unsaved-changes guard and the Changes compare are left untouched.
localize() now treats a node or attribute rewritten since its last translation as a new source,
so EN -> PL -> EN never restores stale text. Our own buttons go through the same hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 09:47:21 +02:00
adminandClaude Opus 5.5 d9573d3657 Answer the family search contract on /search?format=v1
Atrium's Home asks every module GET /api/v1/search?format=v1&q=&limit= and reads one shape
(dredd_core.search_contract, 0.17.0). Galena's palette already owns the key `hits` with its own
item shape, so the contract is opt-in by format=v1 and the legacy body is unchanged until the
palette migrates. Same readable-only scan as before; links are the console's own n/<id> routes.
The requirements pin stays at v0.16.0 under a TODO(search-contract) until the tag exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 09:45:52 +02:00
adminandClaude Opus 5.5 5e806434ac Repin dredd-core v0.16.0: charset=utf-8 on every JSON response
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 23:41:27 +02:00
adminandClaude Opus 5.5 ff01304f77 Declare charset=utf-8 on every JSON response
Galena sent raw UTF-8 under a bare application/json and
application/problem+json (API, problem responses 401/404/405/422/500,
OpenAPI, /healthz). Windows PowerShell 5.1's Invoke-RestMethod decodes
that as Latin-1 ("Rozporządzenie" -> "RozporzÄ…dzenie"); the same fix as
Insider be065e7.

One line in edge.SecurityHeaders (the outermost middleware):
dredd_core.json_charset.ensure_json_charset_message appends the charset
to application/json and application/*+json only; HTML, event streams
and binary responses are untouched, nothing is buffered.

tests/test_json_charset.py sweeps every parameter-free GET route plus
OpenAPI, /healthz and 401/404/405/422/500 problem responses, DB-free.

TODO before merge: repin dredd-core to v0.16.0 (json_charset is new
there); requirements.txt carries the marked TODO, still on v0.15.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 23:01:49 +02:00
adminandClaude Opus 5.5 a15de2364f Merge branch 'readerjs-remote': load ReaderJS from its own repo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:32:25 +02:00