Skip to content

[0.0.28] feat(init): show offline bundled and installed plugin groups (#2436) - #2615

Merged
Xuepoo merged 1 commit into
mainfrom
ctx-1498/feat-init-plugin-inventory
Oct 24, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
ctx-1498/feat-init-plugin-inventory

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implement option 1 from #2436. bitty init now discovers the real offline plugin inventory instead of listing only bitty-terminal.shell-integration under an "official, offline-safe" header:

  • Bundled — compiled into the binary; the only selectable rows and installable without a payload fetch.
  • Installed — ids already staged in the local plugin store index; informational and already local.
  • Needs network — the remaining embedded official catalog entries, shown as a bounded count only; nothing is fetched.

A bundled id that is also installed appears once under Bundled. Every empty group prints none; an empty bundled set prints an explicit skip line. Installed rows are capped at 8 with a counted remainder for bitty plugin list.

Discovery is read-only and local-only: load_index reads $XDG_DATA_HOME/bitty/plugins/current.json (or the ~/.local/share fallback); no network request, no config write. A malformed index degrades to bundled-only with one bounded, sanitized warning; a missing data root simply reports nothing installed. --yes, explicit --plugins/--no-plugins, and --profile NAME bypass discovery entirely; capability grants and installs keep their existing confirmation flow.

Priority: P2 | Area: cli/init | Labels: feat,P2,area:cli,area:plugin | Milestone: v0.0.28 | RFC: - | Task: CTX-1498

Tests

  • bundled-only, installed-only, overlap (bundled precedence), empty inventory
  • malformed store index (pure inventory + dispatch fail-soft, config still written, store bytes unchanged)
  • non-TTY line fallback and --yes (never reads/reports the store)
  • selection behavior unchanged: installed/network rows are never selectable, bundled ids still select in catalog order
  • installed-row display bound

Verification

  • cargo fmt --all -- --check
  • cargo clippy -p bitty-terminal --all-targets --locked -- -D warnings
  • cargo clippy -p bitty-terminal --features dev-tools --all-targets --locked -- -D warnings
  • cargo test -p bitty-terminal --bin bitty --locked init_ — 116 passed
  • bitty-manual: just check (prettier, markdownlint, schema, package)

Documentation

Companion docs PR: bitty-terminal/bitty-manual#77

Pre-existing local gate notes

just scratch-paths already fails on main without this diff (scripts/make-appimage.sh uses /tmp/bitty refs outside the allowlist). It is not introduced here and is recorded as a CarryCtx risk rather than silently fixed. just markdownlint is green after rebasing onto current origin/main.

Closes #2436

@Xuepoo Xuepoo added this to the v0.0.28 milestone Oct 24, 2026
@Xuepoo Xuepoo added feat Feature area:plugin Area: plugin host P2 Priority: medium area:cli Area: command-line interface labels Oct 24, 2026
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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 30 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4eb87fee-882a-484b-a5ed-221ca3a14751
Commits

Reviewing files that changed from the base of the PR and between 7c5a5a9 and 78fac7e.

Files selected for processing: 3
  • CHANGELOG.md
  • crates/bitty-terminal/src/init.rs
  • crates/bitty-terminal/src/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…ps (#2436)

The init plugin step listed only the bundled shell-integration id and its
"official, offline-safe" header implied that was the whole official set.

Discover the real offline inventory from the local plugin store index and
render three explicit groups: Bundled (selectable, no payload fetch),
Installed (already local, informational), and a bounded count of other
official entries that need a network install (never fetched). A bundled id
that is also installed is shown once under Bundled, and every empty group
prints "none".

Discovery is read-only: a malformed index or missing data root degrades to
bundled-only with one bounded warning and never blocks the config write.
`--yes`, explicit `--plugins`/`--no-plugins`, and named-profile writes never
read the store; selection remains limited to bundled ids and the existing
install/capability confirmation is unchanged.
@Xuepoo
Xuepoo force-pushed the ctx-1498/feat-init-plugin-inventory branch from 67c58fd to 78fac7e Compare October 24, 2026 05:06

@Xuepoo Xuepoo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guard verification (independent agent, bitty blitz guard tick, 2026-10-24 14:20 CST)

Head 78fac7eb (ctx-1498/feat-init-plugin-inventory). Checks on the exact head SHA: 20 pass,
0 fail, 0 pending.

What was verified independently:

  1. Scope matches issue #2436: the init plugin step no longer shows only
    bitty-terminal.shell-integration under an "official, offline-safe" header; it now reports
    Bundled (selectable, installable without a payload fetch), Installed (already staged,
    informational), and a bounded count for Needs network entries that are never fetched.
  2. The load path is read-only and local: load_index reads
    $XDG_DATA_HOME/bitty/plugins/current.json with the documented ~/.local/share fallback,
    issues no network request, writes no config, and touches no store bytes. That respects the
    workspace rule that no host/environment value is hardcoded — the data root is derived from
    XDG, not from a fixed path.
  3. Fail-soft behaviour is specified rather than assumed: a malformed index degrades to
    bundled-only with one bounded, sanitized warning and the config is still written; a missing
    data root simply reports nothing installed. Empty groups print none, and an empty bundled
    set prints an explicit skip line, so no silent blank section is possible.
  4. Non-interactive semantics are preserved: --yes, explicit --plugins/--no-plugins, and
    --profile NAME bypass discovery entirely, and capability grants plus installs keep the
    existing confirmation flow — no new implicit install path.
  5. Bounded display: installed rows cap at 8 with a counted remainder, so a large store cannot
    flood the step; bundled ids still select in catalog order with bundled precedence on overlap.
  6. Test coverage matches each claim (bundled-only, installed-only, overlap precedence, empty
    inventory, malformed index incl. store-bytes-unchanged, non-TTY/--yes, selection
    invariance, display bound). No let-chains introduced; no hardcoded paths.

Verdict: merge-eligible on this evidence (CI + diff scope + read-only/fail-soft invariants).

@Xuepoo
Xuepoo merged commit d640dad into main Oct 24, 2026
32 of 33 checks passed
@Xuepoo
Xuepoo deleted the ctx-1498/feat-init-plugin-inventory branch October 24, 2026 06:04
@Xuepoo Xuepoo mentioned this pull request Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:cli Area: command-line interface area:plugin Area: plugin host feat Feature P2 Priority: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bitty init: plugin step should show the official plugins that are actually available

1 participant