Skip to content

Commit 115410b

Browse files
Fix post-refactor regressions and bump native vendor to Zireael #103 (#223)
* refactor(renderer): replace WeakMap theme propagation with stack * chore(native): sync Zireael v1.3.8-alpha.8 * core(drawlist): add buildInto for v2 and v3 builders * ci: optimize PR pipeline — concurrency, fast gate, reduced matrix - Add concurrency group to ci.yml and codeql.yml to cancel in-progress runs on re-push (biggest win for runner contention) - Extract lint/typecheck/codegen/portability/unicode into a dedicated `checks` job that gates the matrix — lint failures caught in ~2 min instead of after the full 15-min pipeline - Dynamic matrix: 5 runners on PRs (Linux × Node 18/20/22, macOS × 22, Windows × 22), full 3×3 on push to main - Remove redundant lint/typecheck/codegen/biome-install steps from each matrix cell and the bun job - Remove duplicate docs job (already handled by docs.yml) Net effect on PRs: 13 jobs → 9, ~44% fewer runners, fast-fail on static checks, stale runs cancelled automatically. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Revert "ci: optimize PR pipeline — concurrency, fast gate, reduced matrix" This reverts commit 183532e. * EPIC 6: packed style pipeline + Zireael vendor bump * fix(core): restore canvas overlay hex parsing * fix(ci): satisfy guardrails, lint, and typecheck * fix(review): address outstanding PR threads and CI regressions * feat: land blit-rect pipeline and regression audit tooling * Fix refactor regressions and sync native vendor to Zireael PR * Bump vendored Zireael to include review-thread fixes * vendor zireael: bump to c0849ae after main merge * Address PR #223 unresolved review feedback * Fix drawlist text perf counters and CI lockfile sync * Fix regression dashboard lint violations * Fix CI lint failures and apply review nitpicks * Apply biome formatting fixes for CI lint --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fa62449 commit 115410b

File tree

166 files changed

+7816
-3997
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+7816
-3997
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ jobs:
5858
- name: Check core portability
5959
run: npm run check:core-portability
6060

61+
- name: Check native vendor integrity
62+
run: npm run check:native-vendor
63+
6164
- name: Check Unicode pins (submodule sync)
6265
run: npm run check:unicode
6366

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Key pipeline files:
5555
- `packages/core/src/runtime/router/wheel.ts` — mouse wheel routing for scroll targets
5656
- `packages/core/src/renderer/renderToDrawlist/renderTree.ts` — stack-based DFS renderer
5757
- `packages/core/src/layout/dropdownGeometry.ts` — shared dropdown overlay geometry
58-
- `packages/core/src/drawlist/builder_v1.ts` — ZRDL binary drawlist builder
58+
- `packages/core/src/drawlist/builder.ts` — ZRDL binary drawlist builder (unified)
5959

6060
## Layout Engine Baseline (Current)
6161

@@ -129,7 +129,7 @@ When core widget APIs change, JSX must be updated in the same change set.
129129

130130
### Drawlist writer codegen guardrail (MUST for ZRDL command changes)
131131

132-
The v3/v4/v5 command writer implementation is code-generated. Never hand-edit
132+
The command writer implementation is code-generated. Never hand-edit
133133
`packages/core/src/drawlist/writers.gen.ts`.
134134

135135
When changing drawlist command layout/opcodes/field widths/offsets:

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ packages/core/src/
5050
renderToDrawlist/
5151
renderTree.ts # Stack-based DFS renderer
5252
drawlist/
53-
builder_v1.ts # ZRDL binary drawlist builder (v1)
54-
builder_v2.ts # Drawlist builder v2 (cursor protocol)
55-
builder_v3.ts # Drawlist builder v3
53+
builder.ts # ZRDL binary drawlist builder (single unified version)
54+
builderBase.ts # Abstract base class for drawlist builder
55+
writers.gen.ts # Generated drawlist command writers (codegen)
5656
keybindings/
5757
manager.ts # Modal keybinding system
5858
parser.ts # Key sequence parsing

docs/backend/native.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ source.
163163
- **Node.js 18+** with npm
164164
- **Rust toolchain** (for napi-rs compilation)
165165
- **C toolchain** (gcc, clang, or MSVC) for the Zireael engine
166-
- **Git submodules** initialized (`vendor/zireael` must be present)
166+
- **Git metadata available** (for vendor pin checks; full submodule checkout is needed when refreshing vendored engine sources)
167167

168168
### Build Command
169169

docs/dev/build.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ cd Rezi
3535
git submodule update --init --recursive
3636
```
3737

38-
The `vendor/zireael` submodule contains the Zireael C engine source. It must be
39-
present for native addon builds, but is not required for TypeScript-only
40-
development.
38+
The `vendor/zireael` submodule tracks the upstream Zireael source and commit
39+
pin metadata. Native addon builds compile from the package-local snapshot at
40+
`packages/native/vendor/zireael`; submodule checkout is required when syncing
41+
or auditing vendored engine updates, but not for TypeScript-only development.
4142

4243
Install all dependencies:
4344

docs/dev/repo-layout.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ Build, test, and CI automation scripts.
144144
| `docs.sh` | Documentation build/serve with automatic venv management. |
145145
| `guardrails.sh` | Repository hygiene checks for forbidden patterns (legacy scope/name, unresolved task markers, and synthetic-content markers). |
146146
| `check-core-portability.mjs` | Scans `@rezi-ui/core` for prohibited Node.js imports. |
147+
| `check-native-vendor-integrity.mjs` | Verifies native vendor source wiring and `VENDOR_COMMIT.txt` pin consistency with `vendor/zireael`. |
147148
| `check-unicode-sync.mjs` | Verifies Unicode table versions are consistent. |
148149
| `check-create-rezi-templates.mjs` | Validates scaffolding templates are up to date. |
149150
| `verify-native-pack.mjs` | Checks native package contents before npm publish. |
@@ -152,9 +153,11 @@ Build, test, and CI automation scripts.
152153
## vendor/zireael
153154

154155
The Zireael C rendering engine, pinned as a git submodule. This is the upstream
155-
source used by `@rezi-ui/native` for compilation. The native package keeps its
156-
own vendored snapshot at `packages/native/vendor/zireael` as the compile-time
157-
source.
156+
reference tree. `@rezi-ui/native` compiles from the package-local snapshot at
157+
`packages/native/vendor/zireael` (see `packages/native/build.rs`).
158+
159+
`packages/native/vendor/VENDOR_COMMIT.txt` must match the repo gitlink pointer
160+
for `vendor/zireael`; CI enforces this via `npm run check:native-vendor`.
158161

159162
Initialize with:
160163

docs/protocol/versioning.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Pinned drawlist version:
2424

2525
Rezi currently emits ZRDL v1, and the engine accepts v1/v2.
2626
ZRDL v2 adds opcode `14` (`BLIT_RECT`).
27+
Style link reference fields (`linkUriRef`, `linkIdRef`) are stable across v1/v2:
28+
`0` means unset and positive values are 1-based string resource IDs.
2729

2830
## Event Batch (ZREV)
2931

docs/protocol/zrdl.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,23 @@ Commands are 4-byte aligned.
5757
- `FREE_*` invalidates that ID.
5858
- Draw commands referencing unknown IDs fail.
5959

60+
## Style Payload Link References
61+
62+
Text-bearing commands carry style fields that include hyperlink references:
63+
64+
- `linkUriRef` (`u32`)
65+
- `linkIdRef` (`u32`)
66+
67+
These fields use the same ID space as `DEF_STRING`/`FREE_STRING` and are
68+
**1-based**:
69+
70+
- `0` means "no active link" (sentinel unset)
71+
- `N > 0` maps to string resource ID `N`
72+
73+
Rezi encodes link references as `(internedIndex + 1)`, and Zireael resolves
74+
them as direct string IDs. This is part of the v1/v2 wire contract and does
75+
not introduce a new drawlist version.
76+
6077
## Codegen
6178

6279
Command layouts are defined in `scripts/drawlist-spec.ts`.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Regression Dashboard Example
2+
3+
Dashboard-based regression app for manually validating rendering behavior after core refactors.
4+
5+
## Run (from repo root)
6+
7+
```bash
8+
npm --prefix examples/regression-dashboard run start
9+
```
10+
11+
Interactive mode requires a real TTY terminal.
12+
13+
## Run with HSR
14+
15+
```bash
16+
npm --prefix examples/regression-dashboard run dev
17+
```
18+
19+
## Headless Preview (non-TTY safe)
20+
21+
```bash
22+
npm --prefix examples/regression-dashboard run preview
23+
```
24+
25+
## Build / Typecheck / Test
26+
27+
```bash
28+
npm --prefix examples/regression-dashboard run build
29+
npm --prefix examples/regression-dashboard run typecheck
30+
npm --prefix examples/regression-dashboard run test
31+
```
32+
33+
## What to check
34+
35+
- Scroll service lanes with wheel/keys and verify no visual tearing.
36+
- Change filters/theme while telemetry ticks are active.
37+
- Open/close help modal repeatedly.
38+
- Verify focus/selection remains stable during rapid updates.
39+
40+
## Controls
41+
42+
- `up` / `down` or `j` / `k`: Move selection
43+
- `f`: Cycle fleet filter
44+
- `t`: Cycle theme
45+
- `p` or `space`: Pause/resume telemetry stream
46+
- `h` or `?`: Toggle help modal
47+
- `q` or `ctrl+c`: Quit

examples/regression-dashboard/package-lock.json

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)