Skip to content

feat(settings): the archive carries a meeting's rooms (2.24) - #700

Merged
mindsers merged 5 commits into
mainfrom
feat/rooms-r4-6-archive-rooms
Nov 28, 2026
Merged

mindsers merged 5 commits into
mainfrom
feat/rooms-r4-6-archive-rooms

Conversation

@mindsers

Copy link
Copy Markdown
Contributor

Parallel rooms R4, PR 6. It ships before PR 7, which creates meetings whose parts hold a row per room, something a 2.23 archive cannot carry.

Export (2.24):

  • schedule-rooms.ndjson: each programme's rooms (name, the main room's key, order, schedule).
  • programme-part-rooms.ndjson: each part's room rows, with their people and conflict.
  • programme-part-assignments.ndjson keeps its shape. A part held in several rooms is also written as one copy per room (as the user decided, 2026-11-28), the shape older versions read, so a restore by one loses nobody.
    • Each copy carries the room as track (« Salle principale » for an unnamed main room) and its place as trackOrder, with that room's people.
    • The other rooms' copies take their row's id negated, never an item's.

Import:

  • A 2.24 archive's copies (negative ids) are skipped.
  • importMeetingRooms (new, last of the meeting steps) gives the main room its archived name, brings the other rooms back in order, and writes each part's rows with their people.
  • A 2.23 or older archive restores as before.

ARCHIVE_VERSION 2.24, with its note in data-transfer.type.ts, and the two files in ENTITY_FILES.

Reference: archive-files.json gains schedule-rooms and programme-part-rooms. The user approved this. archive-export.json and archive-after-import.json don't move: the fixture holds no part in several rooms, so its copies and content are unchanged.

Tests:

  • import-meeting-rooms integration, a full round trip: the rooms fixture's meeting with a row per room (Paul, main room; Marc, « Salle B ») is exported, then restored in another congregation.
    • The archive carries 2 rows and the part's two copies: « Salle principale » (positive id, Paul) and « Salle B » (negative id, Marc).
    • The restore brings back one part with both rooms and their speakers.
    • Skipping the copies on import, or the rooms step itself, makes a case fail.
  • The version and import-order unit tests are updated.

Unit (6,984) and integration (195 files) pass, as do typecheck and guards.

Parallel rooms R4: a part held in several rooms is one item with a row per
room, which 2.23 archives cannot carry.
- schedule-rooms (each programme's rooms, the main one by key) and
  programme-part-rooms (each part's rows with their people and conflict).
- programme-part-assignments also writes such a part's other rooms as one
  copy per room, the shape older versions read, so a restore by one loses
  nobody (user, 2026-11-28); their ids are the rows' negated.
- A 2.24 restore skips those copies and brings the rooms and rows back
  (importMeetingRooms, last of the meetings). A 2.23 archive restores as
  before.
Approved by the user (2026-11-28): archive-files.json gains schedule-rooms
and programme-part-rooms; the archive's content and its restore are
unchanged for the fixture, which holds no part in several rooms.
#700 review: an older restore can put a copy's row in another room than
its track (a « Salle B » copy before its main room's, in the file). A 2.24
restore then upserted the archive's row beside it, leaving the copy held
in two rooms, its person in both. importMeetingRooms now drops a restored
part's rows the archive does not hold before writing the archive's.
The round trip reverses the parts file to reproduce that order.
…room

A 2.23 or older archive brings a part held in several rooms as one copy
per room. When a copy in another room came first in the file, it named the
meeting's still unnamed main room after itself and went in; the main
room's copy then renamed the room back, leaving the other copy in the
main room. The restore now writes main-room copies first. The round trip
covers an older archive whose « Salle B » copy comes first.
… versions

An older version restores programme-part-assignments in file order, and a
copy in another room met before its main room's names the meeting's
still unnamed main room after itself (#700 review: 31 rows misplaced when
a 2.23 app restored a 2.24 file). The export now writes every copy whose
trackOrder is above 1 after the rest. The round trip's set-up moves into
helpers (lint).
@mindsers
mindsers merged commit 36113d6 into main Nov 28, 2026
7 checks passed
@mindsers
mindsers deleted the feat/rooms-r4-6-archive-rooms branch November 28, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant