Repository navigation
[0.0.28] feat(init): show offline bundled and installed plugin groups (#2436) - #2615
Conversation
|
Warning Review limit reachedYou'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. View limit details
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. Comment |
…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.
67c58fd to
78fac7e
Compare
Xuepoo
left a comment
There was a problem hiding this comment.
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:
- Scope matches issue #2436: the init plugin step no longer shows only
bitty-terminal.shell-integrationunder 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. - The load path is read-only and local:
load_indexreads
$XDG_DATA_HOME/bitty/plugins/current.jsonwith the documented~/.local/sharefallback,
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. - 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 printnone, and an empty bundled
set prints an explicit skip line, so no silent blank section is possible. - Non-interactive semantics are preserved:
--yes, explicit--plugins/--no-plugins, and
--profile NAMEbypass discovery entirely, and capability grants plus installs keep the
existing confirmation flow — no new implicit install path. - 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. - 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).
Summary
Implement option 1 from #2436.
bitty initnow discovers the real offline plugin inventory instead of listing onlybitty-terminal.shell-integrationunder an "official, offline-safe" header: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 forbitty plugin list.Discovery is read-only and local-only:
load_indexreads$XDG_DATA_HOME/bitty/plugins/current.json(or the~/.local/sharefallback); 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 NAMEbypass 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
--yes(never reads/reports the store)Verification
cargo fmt --all -- --checkcargo clippy -p bitty-terminal --all-targets --locked -- -D warningscargo clippy -p bitty-terminal --features dev-tools --all-targets --locked -- -D warningscargo test -p bitty-terminal --bin bitty --locked init_— 116 passedbitty-manual:just check(prettier, markdownlint, schema, package)Documentation
Companion docs PR: bitty-terminal/bitty-manual#77
Pre-existing local gate notes
just scratch-pathsalready fails onmainwithout this diff (scripts/make-appimage.shuses/tmp/bittyrefs outside the allowlist). It is not introduced here and is recorded as a CarryCtx risk rather than silently fixed.just markdownlintis green after rebasing onto currentorigin/main.Closes #2436