Repository navigation
[CTX-0097] docs(specifications): propose the panel.overlay capability grammar - #189
Merged
Merged
Conversation
…ds, and error codes The Core admits a panel-attributed overlay (bitty#3132) but no plugin-facing verb exists: panel.overlay is a capability string with no backend, grammar, bound, or error code. This candidate specifies bitty.panel.overlay_show/hide, the parameter grammar, borrowed SCN/RC/envelope bounds with their owners, OV-1..OV-4 as explicitly proposed values, typed denials that allocate nothing, and lifetime across the three existing overlay owners. Acceptance (RFC-OQ-5) is out of scope.
… the gap section Corrects the manifest and consent-profile line numbers and records that the panel-scoped grant row already exists (grant_panel_capability) while nothing consumes it to admit a surface.
Xuepoo
commented
Nov 13, 2026
Xuepoo
left a comment
Contributor
Author
There was a problem hiding this comment.
Guard verification (2026-11-13 cron tick)
Read-only check of the candidate's load-bearing claims. Everything below was re-read by symbol/text, at bitty origin/main 3311892f:
- Namespace choice is grounded, not invented.
bitty.ui.overlay.*already means theW-01capture/transient surface (sdk/plugin-api-v1-lua-surface-rfc.md:43-53), andbitty.panel.*really shipscreate/close/destroy/get_presentation/set_presentation/toggle_floating(crates/bitty-runtime/src/plugin_runtime/services.rs:6988-7057, several answeringnot_implemented). Proposingoverlay_show/overlay_hidein that prefix instead of a third meaning onui.overlayis the defensible reading. - Borrowed constants point at their owners. The
4 + 1envelope andOverlayBusyarepanel-runtime-rfc.mdPR-10 (<= 4active plus1modal, per window); the 128/256 text/tooltip and SCN-1..5 rows are the accepted RichBlock/render constants; RC-1/RC-2 come fromruntime/isolation-resource-rfc.md. OV-1..OV-4 are marked proposed with a rationale each, which is what the corpus requires for a new number. - The tier gap is real.
Overlaycarriesid,kind,bounds,text,tooltip,generation,truncatedand no tier field (crates/bitty-ui/src/panel.rs:239-249), so OP-2's "advisory until a Core change" is a correct reading and not a hidden assumption. - No acceptance claim. Frontmatter is
status: draft, the body says in terms that it asks for review and never means the host implements it, and the PR body carriesRelated bitty#2476/Related bitty#2191with noCloses. - Gates:
Docs quality+Secret scanpass (4/4 checks).
This is a candidate pending owner acceptance; merging it publishes the proposal and closes nothing. bitty#2476 residual 8 therefore stays open until the verb itself is accepted and implemented.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
One candidate specification,
specifications/panel-overlay-capability-candidate.md, plus its row in the specifications index.The gap it addresses: the Core half of a panel-attributed overlay landed in bitty#3132 —
SceneHost::admit_attributed_overlay(crates/bitty-runtime/src/scene_host.rs:418) admits an attributed overlay throughPanelRegistry::create_panel_overlay(crates/bitty-runtime/src/registry/panel.rs:2708), and the presentation session is its only caller throughPresentationOverlayAttribution. The plugin-facing half does not exist:panel.overlayis a capability string (crates/bitty-plugin-host/src/capability.rs:217,:547) with no host backend, no grammar, no bound and no error code. This document is candidate text for RFC-OQ-5 (panel.*capability mapping) and claims no acceptance.Proposed surface
The
bitty.panel.*namespace is used deliberately:bitty.ui.overlay.*is already spent on theW-01capture surface (ui.overlay.focus) and on the presentation spellings ofbitty.ui.present.*(ui.present).optscarries a kind from the closed plugin domain (nonmodal,tooltip;ModalandPaletterefused because the modal authority stays Core-owned), an optionaltierat or below the kind ceiling,text(128 chars) andtooltip(256), and optionalbounds/anchorrequests that host policy may narrow. Multiplicity is 1 per(panel_id, generation), 2 per plugin generation, inside the accepted4+1window envelope; a second raise supersedes and the old id goes stale.Bounds: borrowed vs proposed
Borrowed and cited to their owners, never restated as new: the
4+1envelope andOverlayBusy(Panel Runtime RFC;MAX_OVERLAYS_PER_WINDOW= 4), overlay text 128 / tooltip 256 (MAX_OVERLAY_TEXT_LEN,MAX_OVERLAY_TOOLTIP_LEN), SCN-1..SCN-5 (2048 nodes, depth 32, 256 KiB per block, 2 MiB and 64 blocks per terminal, Rich Presentation RFC),SNAPSHOT_MAX_BYTES256 KiB, RC-5 queue budgets (64 per subscription, 1024 events / 256 KiB per plugin),PENDING_DISMISSED_MAX64, RC-1 and RC-2.Marked proposed with a one-line rationale each: OV-1 (1 live attributed surface per panel generation), OV-2 (2 live surfaces per plugin generation), OV-3 (8 admissions per second per generation), OV-4 (4096-cell bounds area, no axis above 256). Refusing over-cap text instead of truncating it, and the
supersededdismissal reason, are also labelled proposed.Denials and lifetime
New codes in the existing style —
E_PANEL_OVERLAY_INVALID,E_PANEL_OVERLAY_UNAVAILABLE,E_PANEL_OVERLAY_NOT_OWNER,E_PANEL_OVERLAY_BUDGET— withE_CAPABILITY_DENIEDandE_TIMEOUTreused. Six ordered checks, all before allocation, and the rule taken from the code's own refusal path: a refusal allocates nothing. Dismissal is by the raising plugin, generation release (release_attributed_overlays), panel disposal (the epoch sweep), or Core (Esc/ view close), never by callback. A raise by a generation that owns no panel is refused and counted rather than degrading to an unattributed surface, unlike the Core presentation path.Gates
just checkfrom the worktree root, all recipes green:fmt-check(prettier 3.9.6),markdownlint(0.23.1, 0 issues, 111 files),links,metadata,language,agents,hygiene,svg,actionlint(1.7.12). Nobunxsegfault on this run.Scope
Documentation only. No behavior, no capability is granted, no accepted contract is amended. Acceptance of RFC-OQ-5 remains with the panel-contract owner.
Related bitty-terminal/bitty#2476 (residual 8, RFC-OQ-5) and Related bitty-terminal/bitty#2191.