Skip to content

fix(tui): v0.1.6 hotfix — slash key + Shift+Tab + hardcoded version#3

Merged
ste-bah merged 1 commit into
mainfrom
hotfix-v0.1.6-tui-input-and-version
Apr 26, 2026
Merged

fix(tui): v0.1.6 hotfix — slash key + Shift+Tab + hardcoded version#3
ste-bah merged 1 commit into
mainfrom
hotfix-v0.1.6-tui-input-and-version

Conversation

@ste-bah

@ste-bah ste-bah commented Apr 26, 2026

Copy link
Copy Markdown
Owner

Summary

Three production bugs in v0.1.5 broke core TUI interaction. Single hotfix commit on top of main with workspace version bumped to 0.1.6 so release.yml auto-tags and releases.

Bug Symptom Fix
1 / keypress did nothing — every slash command unreachable from TUI dispatch.rs:171 Action::SlashCommand(_) arm now inserts / into the input buffer
2 Shift+Tab no longer cycled permission mode keybindings.rs adds BackTab + KeyModifiers::SHIFT binding alongside the existing NONE binding (crossterm 0.28 emits SHIFT modifier on modern terminals)
3 TUI splash + log lines + User-Agent + release-notes all showed v0.1.0 5 sites swapped to env!("CARGO_PKG_VERSION") (compile-time, picks up workspace version automatically)

Plus Cargo.toml workspace version 0.1.5 → 0.1.6 and matching Cargo.lock regen. Insta splash snapshots updated to reflect the new version-string render output.

Files changed (11)

  • crates/archon-tui/src/input/dispatch.rs — Bug 1 fix
  • crates/archon-tui/src/keybindings.rs — Bug 2 fix + new test
  • crates/archon-tui/src/splash.rs — Bug 3 (TUI splash)
  • crates/archon-tui/tests/snapshots/tui_snapshots__splash_empty_activity.snap — insta snapshot updated
  • crates/archon-tui/tests/snapshots/tui_snapshots__splash_with_activity.snap — insta snapshot updated
  • src/main.rs — Bug 3 (startup log)
  • src/setup.rs — Bug 3 (startup log)
  • src/session.rs — Bug 3 (User-Agent fallback)
  • src/command/release_notes.rs — Bug 3 (rendered body + test constants)
  • Cargo.toml — version bump
  • Cargo.lock — auto-regenerated

+64 / -33 total.

Quality bar

  • Dev flow: 6/6 gates PASSED. Real Sherlock subagent spawns at G3 + G6 (G3 agent ab15d7f4f86886827, G6 agent a5c4d97b584f57bee — independent re-review).
  • cargo check --workspace --tests: exit 0
  • cargo test -p archon-tui: 707/0 PASS (includes new shift_tab_with_shift_modifier_cycles_permission test)
  • cargo test release_notes: 6/0 PASS
  • Zero hardcoded v0.1.0 in production source
  • Live smoke (--exec /tmp/hotfix-v0.1.6-smoke.sh): 7/7 PASS

Test plan

  • cargo check workspace clean
  • cargo fmt --check clean
  • TUI test suite green (707 tests, including new SHIFT-modifier test)
  • release_notes tests green
  • insta splash snapshots updated to v0.1.6 render output
  • Linux + macOS CI matrix on e8ae80a (Windows still disabled per #244)
  • Manual: open TUI, type /, verify it appears in input buffer
  • Manual: open TUI, press Shift+Tab, verify permission mode cycles
  • Manual: TUI splash banner shows Archon v0.1.6

Release impact

After merge, release.yml workflow_run on CI completion detects the unreleased v0.1.6 tag and auto-creates the release.

…HOTFIX-V0.1.6)

Three production bugs in v0.1.5 broke core TUI interaction. Single
hotfix commit on top of main with workspace version bumped to 0.1.6
so the existing release.yml workflow auto-tags and releases.

Bug 1 — slash key dispatch was a no-op
  Pressing `/` in the TUI input dispatched `Action::SlashCommand("/")`
  to a dispatch arm that did NOTHING — input was silently consumed,
  no character insert, no popup. Every slash command (including all
  pre-existing /help, /usage, /memory, /release-notes, /permissions
  etc.) was unreachable from the TUI.

  Root cause: `crates/archon-tui/src/input/dispatch.rs:171`:
    Action::SlashCommand(_) => KeyResult::Nothing,
  was a planning placeholder that was never wired up. Fix replaces
  the no-op with the same insert-then-Nothing pattern used by
  Action::CharInput at line 135-138.

Bug 2 — Shift+Tab no longer cycled permission mode
  crossterm 0.28 (workspace dep at Cargo.toml:41) emits Shift+Tab as
  KeyCode::BackTab + KeyModifiers::SHIFT on modern terminals (iTerm,
  Windows Terminal, GNOME Terminal in default config). The keymap
  binding at keybindings.rs:128-131 only matched BackTab + NONE.
  Modern terminal sent BackTab+SHIFT → no binding match → silent drop.
  This is why "it used to work" — older crossterm versions or older
  terminal configs reported BackTab+NONE.

  Fix adds a SECOND binding for BackTab + KeyModifiers::SHIFT alongside
  the existing NONE binding (defensive — covers both terminal flavors).
  Test added: shift_tab_with_shift_modifier_cycles_permission.

Bug 3 — TUI shows v0.1.0 even on v0.1.5 / v0.1.6 builds
  Five files had hardcoded `v0.1.0` string literals from the project's
  initial commit that were never updated when version bumps shipped:
    - crates/archon-tui/src/splash.rs:173 (TUI splash banner — visible)
    - src/main.rs:143 (startup log line)
    - src/setup.rs:237 (startup log line)
    - src/session.rs:902 (User-Agent fallback)
    - src/command/release_notes.rs:41,88,121 (release-notes body
                                              + 2 test/doc constants)

  Fix swaps every literal to env!("CARGO_PKG_VERSION") (compile-time —
  no runtime cost, picks up the workspace version automatically on
  every build). release_notes test constants now use the same env!
  expansion so they self-validate.

Workspace version bump 0.1.5 → 0.1.6
  Cargo.toml:11 [workspace.package].version = "0.1.6"
  Cargo.lock auto-regenerated to match.

  release.yml's existing workflow_run -> check_tag flow auto-detects
  the new v0.1.6 tag is unreleased and proceeds with the release.

Verified locally:
- cargo check --workspace --tests -j1 --offline: exit 0
- cargo fmt --all -- --check: exit 0
- check-file-sizes.sh + check-tui-file-sizes.sh: exit 0
- cargo test -p archon-tui: 707/0 PASS
  (includes new shift_tab_with_shift_modifier test)
- cargo test -E 'test(/release_notes/)': 6/0 PASS
- grep 'v0\.1\.0|"0\.1\.0"' src/ crates/ --include=*.rs: zero hits
  in production code (test fixtures only)
- live smoke (--exec /tmp/hotfix-v0.1.6-smoke.sh): all 7 checks pass

Cross-platform CI smoke deferred to post-push (Linux + macOS only —
Windows still disabled per #244 in the prior PR #1 work).

Dev flow: 6/6 gates PASSED. Sherlock APPROVED at G3 + G6 with real
subagent spawns (G3 agent ab15d7f4f86886827, G6 agent a5c4d97b584f57bee).
@ste-bah ste-bah merged commit d23a47a into main Apr 26, 2026
38 of 44 checks passed
ste-bah added a commit that referenced this pull request May 5, 2026
…tor, capability matrix, command-surface parity, canonical activity, TUI hang fix)

22 commits from codex/openai-codex-auth landing the finalisation PRD work.
Codex did the bulk of this; the TUI hang fix (#82a33ca) is the response
to the v0.1.44 outline I posted after the DocAnswer-driven render-loop
freeze on 2026-05-05.

Headline changes
----------------

Provider doctor + capability matrix:
  - `archon providers doctor [--live]` and `/providers doctor [--live]`
  - Reports credentials file state, Anthropic/Codex OAuth state,
    ANTHROPIC_API_KEY shape, base URL/proxy state, spoof identity,
    optional live endpoint reachability via TcpProviderLivePinger,
    redacted remediation hints (NEVER prints token values).
  - `archon providers capabilities` + matrix gating: Codex blocked
    from agentic surfaces (pipelines, subagents, gametheory).

Command-surface parity (PRD-ARCHON-FINALISATION-001):
  - `src/command/surface_matrix.rs` — every `PARTIAL` or `SHELL_ONLY`
    row now requires an approved exception with owner + reason +
    review-date. Drift gate `non_done_rows_have_approved_exceptions`
    fails the build if a row goes non-DONE without an exception.
  - `docs/generated/command-surface-matrix.md` regenerated from code.
  - `tests/finalisation_provider_capabilities.rs` covers CLI parse
    + doc drift.

Canonical activity events (new crate surface):
  - `crates/archon-observability/src/activity.rs` (497 lines new)
  - Streams parent/subagent/pipeline/tool events through a single
    canonical channel; jsonl-persisted for replay/audit.
  - TUI activity rail wired to consume canonical events.

TUI hang fix (commit 82a33ca, addresses my v0.1.44 outline #2 + #3):
  - `crates/archon-tui/src/event_channel.rs` (NEW, 253 lines) —
    bounded channel with backpressure; producers .await when full
    instead of growing the queue unbounded (was the 5.96 GB RSS
    bloat root cause).
  - Output rendering now viewport-cached: spans pre-computed on
    append, per-frame slice the scroll-window. Was re-parsing the
    whole markdown buffer per draw, blocking on 200 KB DocAnswer
    dumps.

Release plumbing:
  - `docs/maintenance/provider-smoke.md` — manual provider smoke
    runbook (anthropic + codex)
  - `docs/reference/{cli-flags,slash-commands}.md` updated for
    --live flag and /providers doctor surface
  - `.github/workflows/codex-smoke.yml` — manual-only, no scheduled
    cron (per Steven's standing rule)

Constraints honoured
--------------------

  - Live provider checks are opt-in only (--live flag required).
  - No scheduled GitHub Actions cron added.
  - PRD Phase 7 transcript NOT marked closed in this merge —
    code/doc closure landed but the live shell + interactive TUI
    transcript with source-of-truth inspection + activity timeline
    proof is still owed (must be captured for real, not fabricated;
    target location `.archon/evidence/`).

Verification — verbatim cargo output captured 2026-05-05
--------------------------------------------------------

All commands run from `/home/unixdude/Archon-projects/archon-cli-worktrees/openai-codex-auth`
with `CARGO_BUILD_JOBS=2` and `-j1` per the absolute single-job rule
that crashed WSL twice in prior incidents.

`cargo check -p archon-cli-workspace -j1`:

    Compiling archon-cli-workspace v0.1.43 (...openai-codex-auth)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.72s

`cargo test -p archon-cli-workspace -j1 command::providers -- --test-threads=1`:

    test command::providers::tests::cli_handle_capabilities_renders_without_error ... ok
    test command::providers::tests::description_and_aliases ... ok
    test command::providers::tests::execute_capabilities_lists_codex_tui_but_not_pipelines ... ok
    test command::providers::tests::execute_doctor_live_reports_endpoint_checks ... ok
    test command::providers::tests::execute_doctor_reports_local_state_without_tokens ... ok
    test command::providers::tests::execute_does_not_list_stripped_providers ... ok
    test command::providers::tests::execute_emits_total_count_line ... ok
    test command::providers::tests::execute_lists_both_section_headers ... ok
    test command::providers::tests::execute_lists_known_compat_providers ... ok
    test command::providers::tests::execute_lists_known_native_providers ... ok
    test command::providers::tests::execute_total_row_count_matches_registry_size ... ok
    test command::providers::tests::fmt_features_renders_compact_csv_or_none ... ok
    test command::providers::tests::providers_dispatches_via_registry ... ignored, Gate 5 live smoke — exercises Registry dispatch via default_registry(), run via --ignored
    test command::providers::tests::render_provider_doctor_from_json_redacts_credentials ... ok
    test command::providers::tests::render_provider_doctor_live_reports_ping_failure ... ok
    test command::providers::tests::render_provider_doctor_live_skips_missing_or_disabled_credentials ... ok
    test command::providers::tests::render_provider_doctor_live_uses_pinger_without_printing_tokens ... ok
    test command::providers::tests::render_provider_doctor_marks_codex_kill_switch ... ok
    test command::providers::tests::render_provider_doctor_reports_spoof_proxy_and_remediation ... ok
    test command::providers::tests::truncate_chars_appends_ellipsis_only_when_over ... ok
    test result: ok. 19 passed; 0 failed; 1 ignored; 0 measured; 606 filtered out; finished in 0.03s

`cargo test -p archon-cli-workspace -j1 command::surface_matrix -- --test-threads=1`:

    test command::surface_matrix::tests::exception_rows_match_real_command_rows ... ok
    test command::surface_matrix::tests::generated_command_surface_doc_matches_code ... ok
    test command::surface_matrix::tests::non_done_rows_have_approved_exceptions ... ok
    test command::surface_matrix::tests::required_prd_command_families_have_tui_entries ... ok
    test command::surface_matrix::tests::shell_only_rows_do_not_claim_slash_support ... ok
    test command::surface_matrix::tests::slash_rows_are_registered_primaries ... ok
    test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 620 filtered out; finished in 0.00s

`cargo test -p archon-cli-workspace -j1 --test finalisation_provider_capabilities -- --test-threads=1`:

    test cli_parses_providers_capabilities_subcommand ... ok
    test cli_parses_providers_doctor_live_flag ... ok
    test cli_parses_providers_doctor_subcommand ... ok
    test generated_provider_capabilities_doc_matches_code ... ok
    test provider_capability_matrix_documents_anthropic_agentic_surfaces ... ok
    test provider_capability_matrix_documents_codex_tui_but_not_pipelines ... ok
    test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

`cargo test -p archon-cli-workspace -j1 docs_do_not_reference_unknown_slash_commands -- --test-threads=1`:

    test command::docs_drift::tests::docs_do_not_reference_unknown_slash_commands ... ok
    test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 625 filtered out; finished in 0.00s

`./target/debug/archon providers doctor --live`:

    Provider doctor (local checks + live endpoint reachability)

    Credentials file: present
    Anthropic OAuth:  present
    Codex OAuth:     missing
    ANTHROPIC_API_KEY env: missing
    Anthropic base URL: default
    Proxy env:       set
    Anthropic spoof identity: active for Claude OAuth credential file
    Codex spoof identity: unavailable until Codex OAuth credentials are present

    Capability source of truth: `archon providers capabilities` or `/providers capabilities`
    Live provider pings:
      Anthropic ok: endpoint reachable (api.anthropic.com:443)
      Codex     skipped: credentials missing
    Remediation:
      - Codex missing: run `archon auth login --provider openai-codex` for Codex TUI/chat support.
      - Capability mismatch: run `archon providers capabilities` before using a provider on pipelines/subagents.

NO token values appear in the live doctor output above (the
render_provider_doctor_live_uses_pinger_without_printing_tokens unit
test enforces this contract; passes per the cargo output above).

Merge dry-run from main was clean — `git merge --no-commit --no-ff
codex/openai-codex-auth` reported "Automatic merge went well; stopped
before committing as requested" with 109 files staged, +3989 / -476 in
the cumulative diff vs main. Aborted cleanly via `git merge --abort`,
main returned to c6d49b7.

Cargo.toml version stays at 0.1.43 in this merge — the version bump to
0.1.44 (with proper release notes covering this merge's surface) lands
as a follow-up commit so the Release workflow correctly auto-fires for
the new tag.
@ste-bah ste-bah deleted the hotfix-v0.1.6-tui-input-and-version branch May 8, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant