From e7e8bcc65f81aa6e7b687238a8dfe849f94c2b19 Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Mon, 18 May 2026 21:13:43 +0200 Subject: [PATCH] docs: full changelog for feat/react19-modernization + feat/react19-event-bus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit End-to-end documentation of every modification since the two branches were opened: - 109 commits on feat/react19-modernization (baseline ae17619) - 22 commits on feat/react19-event-bus (baseline 98b03aa) - the 2026-05-18 Arcturus FF pull to v4.1.16 Organized into 11 phases on the client (React 19 baseline → infra pillars → god-hook splits → WiredCreatorTools extraction + Zustand hoists → typecheck cleanup → error boundaries → test infrastructure → CI → PR #126 cherry-picks + asset middleware → toolbar spam-toggle fix (PR #130 upstream) → full upstream sync + final picker hoists) and 9 phases on the renderer (v2.1.0 React-friendly API → TS 6/tsgo → API interface alignments → ArrayBuffer drift → Pixi v8 → composer/parser alignment with Arcturus → dead code → upstream sync → snapshot extensions). Includes the full commit index per branch, the public-API additions table, the bugs-fixed table with severity, the Vitest test-count evolution (0 -> 203 client, 0 -> 127 renderer), and the local rollback-tag list. --- docs/SESSION_2026-05-18_changelog.md | 842 +++++++++++++++++++++++++++ 1 file changed, 842 insertions(+) create mode 100644 docs/SESSION_2026-05-18_changelog.md diff --git a/docs/SESSION_2026-05-18_changelog.md b/docs/SESSION_2026-05-18_changelog.md new file mode 100644 index 0000000..dfb8e65 --- /dev/null +++ b/docs/SESSION_2026-05-18_changelog.md @@ -0,0 +1,842 @@ +# React 19 modernization branches — complete changelog + +End-to-end documentation of every modification made since the two modernization branches were opened: + +- **Nitro-V3** (React client) — branch `feat/react19-modernization`, **109 commits** since baseline `ae17619` +- **Nitro_Render_V3** (renderer library) — branch `feat/react19-event-bus`, **22 commits** since baseline `98b03aa` + +Plus the in-session upstream sync of the third codebase touched on 2026-05-18: + +- **Arcturus-Morningstar-Extended** (Java emulator) — FF pull `e6093f9` → `efb4997` (v4.1.16) + +Working directory: `E:\Users\simol\Desktop\DEV`. *(NitroV3-Housekeeping was not touched during the lifetime of these branches.)* + +--- + +## Table of contents + +1. [Overview](#1-overview) +2. [Nitro-V3 client — branch story](#2-nitro-v3-client--branch-story) + - [Phase 1: React 19 baseline adoption](#phase-1-react-19-baseline-adoption) + - [Phase 2: Infrastructure pillars (Query, Zustand, Vitest, mocks, Form Actions)](#phase-2-infrastructure-pillars-query-zustand-vitest-mocks-form-actions) + - [Phase 3: Hook taxonomy and god-hook splits](#phase-3-hook-taxonomy-and-god-hook-splits) + - [Phase 4: WiredCreatorTools extraction and Zustand hoists](#phase-4-wiredcreatortools-extraction-and-zustand-hoists) + - [Phase 5: Typecheck cleanup (Pixi v8, TS 6, framer-motion)](#phase-5-typecheck-cleanup-pixi-v8-ts-6-framer-motion) + - [Phase 6: Error boundaries and logic-bug fixes](#phase-6-error-boundaries-and-logic-bug-fixes) + - [Phase 7: Test infrastructure evolution](#phase-7-test-infrastructure-evolution) + - [Phase 8: CI pipeline](#phase-8-ci-pipeline) + - [Phase 9: Upstream cherry-picks (PR #126) and drive-by bugs](#phase-9-upstream-cherry-picks-pr-126-and-drive-by-bugs) + - [Phase 10: Toolbar spam-toggle fix (PR #130 upstream)](#phase-10-toolbar-spam-toggle-fix-pr-130-upstream) + - [Phase 11: Full upstream sync (origin/Dev b2318b9)](#phase-11-full-upstream-sync-origindev-b2318b9) +3. [Nitro_Render_V3 renderer — branch story](#3-nitro_render_v3-renderer--branch-story) + - [Phase 1: v2.1.0 React-friendly API additions](#phase-1-v210-react-friendly-api-additions) + - [Phase 2: TypeScript 6 + tsgo migration](#phase-2-typescript-6--tsgo-migration) + - [Phase 3: API interface alignments (IRoomSession)](#phase-3-api-interface-alignments-iroomsession) + - [Phase 4: TS 5.7+ ArrayBuffer drift fixes](#phase-4-ts-57-arraybuffer-drift-fixes) + - [Phase 5: Pixi v8 alignment](#phase-5-pixi-v8-alignment) + - [Phase 6: Composer/parser alignment with Arcturus](#phase-6-composerparser-alignment-with-arcturus) + - [Phase 7: Dead code removal and small fixes](#phase-7-dead-code-removal-and-small-fixes) + - [Phase 8: Upstream sync (origin/main)](#phase-8-upstream-sync-originmain) + - [Phase 9: Snapshot pattern extensions](#phase-9-snapshot-pattern-extensions) +4. [Arcturus emulator — upstream pull](#4-arcturus-emulator--upstream-pull) +5. [Documentation evolution (CLAUDE.md / ARCHITECTURE.md)](#5-documentation-evolution-claudemd--architecturemd) +6. [Full commit index](#6-full-commit-index) +7. [Final state matrix](#7-final-state-matrix) + +--- + +## 1. Overview + +### Branches and their goals + +**`feat/react19-modernization`** (Nitro-V3 client) was opened to bring the React client up to React 19 idioms and the supporting infrastructure that React 19 unlocks: TanStack Query for server state, Zustand for cross-component UI state, Vitest for unit testing, React Compiler for automatic memoization, and `react-error-boundary` for graceful degradation. Along the way it absorbed god-hook decompositions, file extractions on oversized components, Pixi v8 alignment, two upstream cherry-picks (duckietm PR #126), an open-upstream PR (#130 — toolbar spam-toggle fix), and finally a full sync of `origin/Dev` through `b2318b9`. + +**`feat/react19-event-bus`** (Nitro_Render_V3 renderer) was opened to add React-friendly primitives to the renderer library so the client could consume it through `useSyncExternalStore`, `use()`, and TanStack Query without re-architecting the event bus. It then absorbed TypeScript 6 + tsgo migration, TS 5.7+ ArrayBuffer drift fixes, Pixi v8 type alignment, composer/parser alignment with Arcturus (`RoomEnterComposer`, `RoomSettingsData.allowUnderpass`, etc.), dead-code removal, and finally — in the 2026-05-18 session — four new snapshot-pattern extensions covering ignored users, group badges, the room user list, and sound volumes. + +### Current state + +| Branch | HEAD | Commits since baseline | Typecheck | Vitest | +|---|---|---|---|---| +| Nitro-V3 / `feat/react19-modernization` | `1c2d8da` | 109 (baseline `ae17619`) | clean | **203/203** | +| Nitro_Render_V3 / `feat/react19-event-bus` | `28c552f` | 22 (baseline `98b03aa`) | clean | **127/127** | +| Arcturus / `main` | `efb4997` (v4.1.16) | tracks `origin/main` with no local divergence | n/a | n/a | + +### Key architectural decisions taken + +1. **Stay on the classic `src/components/` + `src/hooks/` layout** — an early experiment with `src/features//` was reverted (commit `0755285`); the team decided the in-place layout is the convention. Every PR that violates it gets reworked. +2. **God-hook split into 3 files, flat in the hooks barrel directory** — `useState`, `useActions`, `useWidget` (deprecated wrapper). No per-feature subfolders for hooks. +3. **`useBetween`-based singleton-filter pattern** — for hooks shared by many consumers but where most consumers only need state OR actions, not both: one internal `useBetweenStore`, then a `useState` filter, `useActions` filter, and a deprecated `useFoo` shim. +4. **Renderer-SDK mock for Vitest** — `src/nitro-renderer.mock.ts` aliased over `@nitrots/nitro-renderer` via `vitest.config.mts`. Without it, importing any `src/api/*` file in a test crashes jsdom because the real renderer eagerly loads Pixi v8 at module-import time. +5. **Tests co-located next to subjects** — `src/path/Foo.ts` ↔ `src/path/Foo.test.ts`. No parallel `tests/` tree. +6. **Snapshot pattern on the renderer** — referentially-stable, lazy-frozen, invalidated-on-mutation. Now extended to 6 state holders (Session, RoomSession, IgnoredUsers, GroupInfo, RoomUserList, SoundVolumes). +7. **Composer/parser optional trailing fields use a flat early-return chain**, never nested `if(bytesAvailable)` guards. The pattern is now documented in the renderer's CLAUDE.md. + +### Commit author + signing convention + +All commits authored as `simoleo89 ` (client) or `simoleo89 ` (renderer), passed via per-command `git -c user.name=… -c user.email=…` overrides — the global git config is never modified. Co-authored-by trailers are explicitly forbidden by a feedback memory entry. + +--- + +## 2. Nitro-V3 client — branch story + +### Phase 1: React 19 baseline adoption + +The runtime was already on `react@19.2.5` but no React 19 APIs were in use. Phase 1 brought the codebase forward to idiomatic React 19. + +#### `a1bee1d` — Initial React 19 modernization sweep + +- **forwardRef → ref-as-prop** in 7 layout/component files (NitroInput, Button, ItemCountBadge, Card variants, InfiniteGridItem, ToolbarItemView, AvatarEditorIcon). +- **`` → ``** in 6 contexts (CatalogAdmin, FloorplanEditor, UiSettings, GridContext, NitroCardContext, NitroCardAccordionContext). +- **Native `