2026-04-14T08:49:03Z by Showboat 0.6.1
Branch: feature/LNTNGP24-568-manual-process
Commits: b413c84, 2a3e006, 6ea3fe1
Root cause: ProcessSection was keyed on process.data.revisionId. The app polls
server state every 5 seconds (UPDATE_INTERVAL). When the poll returned data after
lock acquisition, the revisionId changed, causing ProcessSection to fully remount —
destroying all in-progress text the user had typed.
Fix: Removed key={revisionId} from BulletinEditor.tsx. Added explicit
syncedRevisionId state tracking in ProcessSection that resets state only on
actual revision changes (React recommended “store previous props” pattern).
Root cause: The radio toggle handler called setEdited(...) to eagerly strip
the inactive modes data. Additionally, updateProcessEntry stripped the other modes
data whenever regions or manualRegions were updated.
Fix: Removed all eager stripping. Both regions and manualRegions coexist in
edit state. Mode consolidation is deferred to buildPayload(table, isManual) at save time.
Root cause: handleDiscardChanges reset edited state but not manualRegions.
Fix: Added setManualRegions(hasManualRegions(initialContent)) to discard handler.
Root cause: RegionDefiner uses useRef to accumulate text across fields.
After save or discard, the parent resets edited state but the refs internal
value was stale (from before the save).
Fix: Added key={syncedRevisionId} to RegionDefiner so it remounts when
the revision changes.
npx tsc --noEmit -p tsconfig.app.json && echo "TypeScript: OK"
TypeScript: OK
npx jest --testPathPattern "Process|Region" 2>&1 | tail -8
PASS src/components/bulletin-editor/RegionDefiner.spec.tsx
PASS src/components/bulletin-editor/RegionPicker.spec.tsx
Test Suites: 5 passed, 5 total
Tests: 34 passed, 34 total
Snapshots: 1 passed, 1 total
Ran all test suites matching /Process|Region/i.
git log --oneline HEAD~4..HEAD
6ea3fe197 b Fix stale state after discard and save-with-lock
2a3e006c4 r Simplify ProcessSection: extract hasManualRegions, derive language default
b413c8421 b Fix manual regions state loss on mode toggle and background poll
05ce62a75 r Simplify RegionDefiner: use onChange prop instead of native event listeners
Before fix: Switching from Manual to Pick destroyed manualRegions data. Switching back showed empty fields.
After fix: All data preserved across toggles. Consolidation happens only at save time.
Step 1: Avalanche section open in edit mode, Pick selected with “Appenzell Innerrhoden”

Step 2: Toggled to Manual, entered text in all 3 languages

Step 3: Toggled back to Pick — region “Appenzell Innerrhoden” still there

Step 4: Toggled back to Manual — all 3 language texts preserved
