Skip to content

docs(sdk): add ui.present to the Lua surface reference - #182

Merged
Xuepoo merged 2 commits into
mainfrom
docs/2849-ui-present
Nov 3, 2026
Merged

Xuepoo merged 2 commits into
mainfrom
docs/2849-ui-present

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Refs #2849

Summary

Documents ui.present in the plugin API reference: the presentation-only overlay session merged in bitty-terminal/bitty#2856 (issue bitty#2849), where a granted plugin draws one non-focusable, non-modal panel above the focused view with no input capture.

  • sdk/reference/ui.md: adds ui.present to the closed Ui head set and a Presentation-only overlay (ui.present) section — named Lua verbs (bitty.ui.present.show / hide) with the bitty.ui.overlay.show / hide alias, an admission/placement table (grant, admission, second claimant, placement, no input, focus-follow, frame budget, dismissal, teardown, safe mode), the ordered show error table, the overlay.dismissed observation, an example, plus updates to the overlay slot row, Limits, and References pinned at bitty@8108e4f7.
  • extensibility/plugin-ui-slot-inventory-candidate.md: the overlay slot row, inventory rules 4 and 6, and the overlay divergence bullet now record the capture-free presentation path and the separate ui.present head (draw authority is not input authority).
  • sdk/reference/README.md: cites crates/bitty-runtime/tests/presentation_overlay_api.rs for the bitty.ui row.

The accepted sdk/plugin-api-v1-lua-surface-rfc.md is deliberately not edited: its closed L2 gate text predates the head, and listing ui.present there would claim ratification it did not receive. The reference page records it as current host fact and the divergence is stated explicitly. No status: field was promoted — sdk/reference/ui.md stays draft and the slot inventory stays draft.

Everything asserted is read from bitty@8108e4f7: crates/bitty-runtime/src/plugin_runtime/presentation_overlay.rs, services.rs (require_presentation_overlay, ui_overlay_show_with_expiry, ui_overlay_hide), crates/bitty-runtime/src/runtime/present.rs (paint order, PRESENTATION_OVERLAY_MIN_COLS / _MAX_ROWS / _MAX_BYTES), crates/bitty-lua/src/host.rs (the present table), crates/bitty-plugin-host/src/capability.rs, crates/bitty-package/src/manifest.rs, and crates/bitty-terminal/src/terminal_app.rs.

Verification

  • npx --yes prettier@3.9.6 --check . --ignore-unknown → "All matched files use Prettier code style!" (rc=0)
  • npx --yes markdownlint-cli2@0.23.1 → 0 issues in 105 files (rc=0)
  • check-docs.mjs links → 105 files, no broken links or fragments (rc=0)
  • check-docs.mjs metadata → 105 files, frontmatter schema valid (rc=0)
  • check-docs.mjs language → 105 files, English only (rc=0)
  • check-docs.mjs agents and check-docs.mjs hygiene → rc=0

bun/bunx segfault in this environment, so the justfile's pinned prettier and markdownlint versions were run through npx, and check-docs.mjs was run under node with the literal .github/scripts path substituted for import.meta.dir in a scratch copy (the repository script is unmodified).

@Xuepoo Xuepoo added the docs Documentation label Nov 3, 2026
Document the presentation-only overlay session added for bitty#2849 on top
of the CTX-1431 session:

- sdk/reference/ui.md: add ui.present to the closed Ui head set, a
  presentation-only overlay section (admission, placement, focus-follow,
  frame budget, dismissal, teardown, safe mode), the ordered show error
  table, the overlay.dismissed observation, and an example; update the
  overlay slot row, limits, and references to bitty@8108e4f7.
- extensibility/plugin-ui-slot-inventory-candidate.md: describe the
  capture-free presentation path on the overlay slot and the separate
  ui.present head.
- sdk/reference/README.md: cite the presentation overlay test path.

The accepted Plugin API v1 Lua Surface RFC is left unchanged; the head is
recorded as post-ratification host fact rather than an amendment.

Refs #2849
@Xuepoo
Xuepoo force-pushed the docs/2849-ui-present branch from 2e5385b to 9b06491 Compare November 3, 2026 11:32
@Xuepoo
Xuepoo merged commit 9731614 into main Nov 3, 2026
6 checks passed
@Xuepoo
Xuepoo deleted the docs/2849-ui-present branch November 3, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant