Skip to content
This repository was archived by the owner on Oct 4, 2026. It is now read-only.

[CTX-0001] feat(plugin): port the bundled statusline to pure Lua - #2

Merged
Xuepoo merged 1 commit into
mainfrom
ctx-0001/feat-statusline-lua
Sep 14, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
ctx-0001/feat-statusline-lua

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Priority: P2 | Area: plugins | Labels: feat,area:plugins,P2 | Milestone: v0.1.0 | RFC: OQ-053 | Task: CTX-0001 (bitty CTX-0398)

Closes #1

Summary

Ports the bundled bitty-terminal.statusline realization to a pure-Lua independent package for the
OQ-053 split. The statusline presentation moves; the workspaceline claim, workspace lifecycle, and
shell integration stay bundled in bitty.

  • lua/statusline/format.lua — bounded, host-free component composition and code-point-safe
    truncation (8 components / 64-char values / 128-char total) over the read-only semantic snapshot
    (cwd/title/exit).
  • lua/statusline/scene.lua — declarative Row/Text statusline composition.
  • lua/statusline/init.lua — mounts the statusline slot, subscribes
    terminal.cwd-changed/terminal.title-changed, recomposes on event; observation-only when the
    host bridge lacks bitty.ui; a denied terminal.semantic-read fails closed.
  • bitty-plugin.toml — identity, capabilities (terminal.semantic-read, ui.rich), and lazy
    events unchanged from the bundled manifest.
  • Tests — Lua 5.4 behavior suite with a fail-closed mock host, LuaLS conformance, and the SDK
    bitty-plugin-lint wrapper.

Gates

just check (markdownlint, prettier, manifest, luaparse, lua5.4 suite 68 assertions, LuaLS
conformance). SDK bitty-plugin-lint validates the manifest with 0 errors, 0 warnings. actionlint
clean; gitleaks no leaks; git diff --check clean. CI: Quality gates, actionlint, CodeQL all pass.

Related

Known gaps (recorded, not fixed here)

  • bitty Lua bridge lacks bitty.ui.mount/update; in-host activation observes snapshots but
    presents no visible block until it lands (bitty CTX-0428).
  • No StatusProvider/status.component contract in v1 (draft post-1.0 provider ecology); the
    package composes one host-owned Row as the v1 adapter (bitty CTX-0429).

Port the bundled bitty-terminal.statusline realization to a pure-Lua independent
package for the OQ-053 split (bitty CTX-0398).

- lua/statusline/format.lua: bounded, host-free component composition and
  code-point-safe truncation (8 components / 64-char values / 128-char total)
  over the read-only semantic snapshot (cwd/title/exit).
- lua/statusline/scene.lua: declarative Row/Text statusline composition.
- lua/statusline/init.lua: mount the statusline slot, subscribe
  terminal.cwd-changed/title-changed, recompose on event; degrades to
  observation-only when the host bridge lacks bitty.ui; a denied
  terminal.semantic-read fails closed.
- bitty-plugin.toml: identity, capabilities (terminal.semantic-read, ui.rich),
  and lazy events unchanged from the bundled manifest.
- tests: Lua 5.4 behavior suite with a fail-closed mock host, LuaLS
  conformance, and the SDK bitty-plugin-lint wrapper.
- The workspaceline claim and workspace lifecycle stay bundled; the bundled
  plugin entry is removed from bitty in the linked PR so this package can
  install under the same id.
@Xuepoo Xuepoo added this to the v0.1.0 milestone Sep 14, 2026
@Xuepoo Xuepoo added feat P2 area:plugins Plugin ecosystem labels Sep 14, 2026
@Xuepoo
Xuepoo merged commit 3eab0f4 into main Sep 14, 2026
5 checks passed
@Xuepoo
Xuepoo deleted the ctx-0001/feat-statusline-lua branch September 14, 2026 05:09
Xuepoo added a commit to bitty-terminal/bitty-plugins that referenced this pull request Sep 14, 2026
Statusline PR bitty-terminal/statusline#2 squash-merged to main at
3eab0f44b9bf76fc8c01a029176a9bd885f91d07; move the submodule pin off the
feature branch (a722e7c) onto mainline. generated/registry.json is unchanged
(registry payload identical).
Xuepoo added a commit to bitty-terminal/bitty-plugins that referenced this pull request Sep 14, 2026
Stacked on ctx-0397/feat-register-palette (bitty-plugins#6) so the two
registry-append changes merge in order without a hand-merge.

- registry/official/statusline.toml identity entry.
- plugins/statusline pinned at statusline mainline
  3eab0f44b9bf76fc8c01a029176a9bd885f91d07 (bitty-terminal/statusline#2
  squash merge).
- generated/registry.json regenerated (3 plugins).
Xuepoo added a commit to bitty-terminal/bitty-plugins that referenced this pull request Sep 14, 2026
…l plugin

Stacked on ctx-0397/feat-register-palette (bitty-plugins#6) so the two
registry-append changes merge in order without a hand-merge.

- registry/official/statusline.toml identity entry.
- plugins/statusline pinned at statusline mainline
  3eab0f44b9bf76fc8c01a029176a9bd885f91d07 (bitty-terminal/statusline#2
  squash merge).
- generated/registry.json regenerated (3 plugins).
Xuepoo added a commit to bitty-terminal/bitty-plugins that referenced this pull request Sep 14, 2026
…l plugin (#9)

Stacked on ctx-0397/feat-register-palette (bitty-plugins#6) so the two
registry-append changes merge in order without a hand-merge.

- registry/official/statusline.toml identity entry.
- plugins/statusline pinned at statusline mainline
  3eab0f44b9bf76fc8c01a029176a9bd885f91d07 (bitty-terminal/statusline#2
  squash merge).
- generated/registry.json regenerated (3 plugins).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port the bundled statusline to an independent pure-Lua plugin package

1 participant