Skip to content

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

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

Xuepoo merged 1 commit into
mainfrom
ctx-0001/feat-palette-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-0397)

Closes #1

Summary

Ports the bundled bitty-terminal.palette realization to a pure-Lua independent
package for the OQ-053 split.

  • lua/palette/filter.lua — bounded, host-free filtering and code-point-safe
    truncation (128 entries / 128-char query / 128-char text).
  • lua/palette/scene.lua — declarative List/Text overlay composition.
  • lua/palette/init.lua — registers bitty-terminal.palette:toggle, subscribes
    focus.changed, mounts/refreshes the overlay; command-only mode when the host
    bridge lacks bitty.ui.
  • bitty-plugin.toml — identity, lazy commands, lazy events unchanged; requests
    ui.rich + ui.overlay (accepted Lua overlay path; recorded difference).
  • 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, LuaLS
conformance). SDK bitty-plugin-lint validates the manifest with 0 errors.

Known gaps (recorded, not fixed here)

  • bitty Lua bridge lacks bitty.ui.mount/update; in-host activation runs
    command-only until it lands.
  • No command-registry enumeration / PickerProvider in v1; entries/query come
    from the plugin settings namespace as a v1 adapter.

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

- lua/palette/filter.lua: bounded, host-free filtering and code-point-safe
  text truncation (128 entries / 128-char query / 128-char text).
- lua/palette/scene.lua: declarative List/Text overlay composition.
- lua/palette/init.lua: register bitty-terminal.palette:toggle, subscribe
  focus.changed, mount/refresh the overlay; degrades to command-only mode when
  the host bridge lacks bitty.ui.
- bitty-plugin.toml: identity, lazy commands, and events unchanged from the
  bundled manifest; requests ui.rich in addition to ui.overlay because the
  accepted Plugin API v1 Lua overlay path requires both (recorded difference).
- tests: Lua 5.4 behavior suite with a fail-closed mock host, LuaLS
  conformance, and the SDK bitty-plugin-lint wrapper.
- The bundled plugin entry is removed from bitty in the linked PR so this
  package can install under the same id (CTX-0406 BundledIdReserved).
@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 3497c70 into main Sep 14, 2026
5 checks passed
@Xuepoo
Xuepoo deleted the ctx-0001/feat-palette-lua branch September 14, 2026 05:09
Xuepoo added a commit to bitty-terminal/bitty-plugins that referenced this pull request Sep 14, 2026
Palette PR bitty-terminal/palette#2 squash-merged to main at
3497c70ac5b22e52826304b801af302da454d262; move the submodule pin off the
feature branch (7fbf888) 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
* [CTX-0004] feat(registry): register the palette official plugin

Register the independent bitty-terminal.palette package (bitty CTX-0397) as an
official entry and pin it as a plugins/palette submodule, per the OQ-053 split
decision and the official onboarding convention (CTX-0426).

- registry/official/palette.toml: identity-only entry (id, name, repository,
  tags, categories, license, compatibility ranges).
- generated/registry.json: regenerated (2 plugins) via just registry-generate.
- .gitmodules + plugins/palette: pinned at the palette port commit 7fbf888.

Merge order: the palette PR (bitty-terminal/palette #2) must merge before this
one; after it merges, re-pin plugins/palette to palette main.

* [CTX-0004] chore(registry): re-pin plugins/palette to mainline

Palette PR bitty-terminal/palette#2 squash-merged to main at
3497c70ac5b22e52826304b801af302da454d262; move the submodule pin off the
feature branch (7fbf888) onto mainline. generated/registry.json is unchanged
(registry payload identical).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant