Repository navigation
[CTX-1416] feat(plugins): add candidate extension component catalog (#2114) - #2369
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 33 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
6c15195 to
efd6744
Compare
Xuepoo
left a comment
There was a problem hiding this comment.
Independent review — PR #2369 ([CTX-1416] candidate extension component catalog)
Verdict: LGTM. Reviewed efd67442 plus the full PR diff (crates/bitty-lua/src/lib.rs, new crates/bitty-lua/src/ui_catalog.rs, docs submodule bump). No blocking findings.
Checks against the review criteria:
-
Stays a candidate surface / no v1 capability claim — pass.
crates/bitty-lua/src/ui_catalog.rs:1— "Extension component catalog (candidate catalog surface; no consumer yet)"; lines 8-13 state "Nothing here is an accepted contract, a plugin-facing API, a compatibility promise, or a shipped extension capability. No production consumer exists: no host path, band host, overlay path, bridge, render loop, Lua surface, or plugin installs, composes, or renders these descriptors". Crate doc (lib.rs:24-25) likewise says "has no production consumer yet (candidate surface only)". Every composition is limited to the accepted v1 node set (Text/Row/Column/List) and explicitly excludesBlock/Image/CodeBlock/Table/Rule.grep -inE 'register_panel|panel|lifecycle'overui_catalog.rsreturns zero hits — no panel orregister_panellifecycle is claimed or mentioned. The spec's onlyPanel Runtime RFCreference (docs/…/extension-component-catalog-candidate.md:75-76) is an out-of-scope/ownership pointer, not a claim. -
Numeric bounds match the source document — pass, no invented constants.
Module cap table (lines 64-72) is a verbatim match of the spec's cap table (extension-component-catalog-candidate.md:351-358): segments/pills/rows64, segment text64B, pill label32B, detail/title/row128B, composed text256 KiB(SCN-3), composed nodes2048(SCN-1). Each constant's doc comment cites the owning record vocabulary (BAND_MAX_REGIONS = 64, status-system draft module text64, bar plugin pill-name bound32, overlay/tooltip128). The aggregate bounds are aliases, not re-declared literals:CATALOG_MAX_TEXT_BYTES = UI_MAX_TEXT_BYTES,CATALOG_MAX_NODES = UI_MAX_NODES,CATALOG_MAX_DEPTH = UI_MAX_DEPTH, which resolve incrates/bitty-lua/src/ui.rs:127,130,133to16/2048/256 * 1024— consistent with the docs'256 KiB/2048/16. No doc-only constant is missing from code, and no code constant is undocumented. -
No hardcoded host paths/usernames — pass.
grep -nE '/home/|/Users/|/mnt/|xuepoo|fuyu|C:\\\\'overui_catalog.rsand the spec: no hits. -
Docs English-only — pass. Only non-ASCII characters are em dashes (U+2014) in prose; no CJK or other non-English text in code or spec.
-
No unrelated edits — pass. 3 files:
lib.rs(+12, doc bullet + module declaration), newui_catalog.rs, and adocssubmodule pointer bump from667c2965to65ce8cd7; that docs commit ([CTX-0138] … (#271)) touches exactlyspecifications/README.mdandspecifications/extension-component-catalog-candidate.md, i.e. only the record this PR implements.
gh pr checks 2369 — every job pass (Analyze (actions|rust), CodeQL, Extension pin drift, Linux Wayland, Linux X11 (xvfb), M1 matrix (Tier 1 aggregate), MSRV 1.85 check, Quality gates (1|2), Supply chain (deny/audit), VM tier (PR), Windows check and test, macOS ARM64 check and test); VM tier (main)/VM tier (nightly ARM64) skipping; CodeRabbit pass with "Review rate limited" (so no independent bot verdict exists). Only non-green line is Compat release matrix (Tier 1 aggregate) pending — queue state, not a failure.
Non-blocking note (out of scope for this candidate slice): the cap anchors to chrome-band/status-system/bar-plugin draft records are prose citations only, so a future acceptance will need to keep those records and these constants in sync; the spec already flags this as open question 8 ("Cap ownership").
Review follow-up for the candidate extension component catalog: - Narrow the candidacy wording: the module and crate docs now state the catalog is a candidate surface with no production consumer (no host path, band/overlay/bridge/render wiring, Lua surface, or plugin opt-in). - Split the cap tests into one at-cap/over-cap boundary test per descriptor cap: segment/pill/sheet-row count, segment/pill-label/detail/title/row bytes, nested-block depth and node budgets, and the aggregate text budget. Removing any cap check fails its boundary test. - Replace the sorted-looking ordering checks with a shuffled-input test that asserts the exact emitted leaf-and-separator sequence for band, status-strip, pill-row, and modal-sheet composition; reversing emission order fails.
efd6744 to
4929a17
Compare
Resolve the docs gitlink to main's pin (7219148), which already contains the catalog spec commit (65ce8cd7 is its ancestor).
Priority: P2 | Area: plugins | Labels: feat,P2,area:plugins | Milestone: v0.1.0 | RFC: extension-component-catalog-candidate.md | Task: CTX-1416
Summary
Bounded slice of bitty#2114: a headless, host-side candidate catalog surface for extension building blocks composed only from the accepted Plugin API v1 node set (
Text,Row,Column,List). Five closed entries:band,pill-row,tooltip-detail-fallback,modal-sheet,status-strip.Candidate catalog surface; no consumer yet. Nothing installs, composes, or renders these descriptors in production: there is no host path, band host, overlay path, bridge, render-loop, or plugin wiring, and no extension can opt in today. The module is candidate evidence, not a plugin API: no Lua surface, no new node kind, no VM, no style fields, no input bindings, no coordinates, no focus/modality, and no capability. This PR does not claim shipped usability.
What changed
crates/bitty-lua/src/ui_catalog.rs— typed descriptors (StripDescriptor,PillRowDescriptor,DetailFallbackDescriptor,ModalSheetDescriptor),CatalogEntryclosed-name parse, purecompose, canonicalfrom_sceneround-trip,verifyfor mutation/ignored-block rejection, typedCatalogError, and documented caps.crates/bitty-lua/src/lib.rs— module + re-exports and a crate-role note that the catalog never constructs a VM.Caps and fail-closed behavior
64(anchored to chrome-bandBAND_MAX_REGIONS); empty declarations/items rejected.64bytes; pill label32bytes (no[/]); detail/title/sheet row128bytes.SCN-1nodes,SCN-3text, and v1 depth; recognition is iterative and early-exiting, so an oversized/over-deep input cannot recurse past the caps.verifywithShapeMismatch.Evidence (local)
cargo test -p bitty-lua --locked: catalog boundary/order tests + full bitty-lua suite pass.cargo clippy -p bitty-lua --all-targets --locked -- -D warnings: clean.cargo fmt --all --check: clean.cargo check --workspace --all-targets --locked: clean.cargo check --target x86_64-pc-windows-gnu --workspace --all-targets --locked: clean.just scratch-paths,just actionlint: clean.act/ci-localrun (per task instruction); remote CI is the acceptance gate.Docs
Companion candidate design note: bitty-terminal-docs PR #271 (
CTX-0138) — Scene shapes, style hooks (reserved), a11y notes, illustrative examples, open points, acceptance criteria.Remainder (why this uses
Refs, notCloses)band/statuslinedogfood migration belongs tobitty-pluginsand needs an accepted Lua-visible surface; no plugin was changed here.Refs #2114