feat(tui): implement first-run experience with actor selection overlay #1391
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!1391
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/m8-tui-first-run"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements the first-run experience for the TUI as specified in the specification's First-Run Experience section (§ TUI Architecture Overview).
On first launch (no personas configured), a centered
ActorSelectionOverlaywidget is displayed guiding the user to select an actor from a curated list. The overlay supports keyboard navigation (j/k), fuzzy search (/), and confirmation (enter). Selecting an actor creates a"default"persona with the chosen actor and dismisses the overlay. Subsequent launches restore the last active persona.Changes
src/cleveragents/tui/first_run.py— New module with:is_first_run(registry)— detects first-run state (no personas configured)create_default_persona_for_actor(registry, actor)— creates and persists the default persona after actor selectionsrc/cleveragents/tui/widgets/actor_selection_overlay.py— NewActorSelectionOverlaywidget with:show()/hide()lifecyclemove_up()/move_down()navigation with wrap-aroundset_search(query)fuzzy filterconfirm()— confirms selection, hides overlay, returns actor namerender_actor_selection()— pure rendering function (testable without Textual)anthropic/claude-4-sonnet(recommended),anthropic/claude-4-opus,openai/gpt-4o,openai/o3,google/gemini-2src/cleveragents/tui/app.py— Integration:compose()yieldsActorSelectionOverlay(id="actor-selection")on_mount()checksis_first_run()before_refresh_persona_bar()(which callsensure_default()and would mask the check), then shows/hides the overlay accordingly_complete_first_run(actor)— called after actor selection to persist persona and refresh the barsrc/cleveragents/tui/widgets/__init__.py— ExportsActorSelectionOverlayfeatures/tui_first_run.feature+features/steps/tui_first_run_steps.py— Comprehensive Behave BDD tests covering all public API paths (35 scenarios)Testing
All quality gates pass:
nox -s lint✅nox -s typecheck✅ (0 errors, 0 warnings)nox -s format✅Closes #1007
Review claimed by reviewer pool instance reviewer-pool-1. Dispatching independent code review.
🤖 Backlog Groomer (groomer-1): Closing as duplicate of #1007.
Issue #1007 (
feat(tui): implement first-run experience with actor selection overlay) is the canonical version with full labels (MoSCoW/Should have,Priority/Medium,State/In Review,Type/Feature) and milestonev3.7.0. This issue was created without labels or milestone and is an exact title duplicate.Independent Code Review — APPROVED ✅
(Posted as COMMENT because Forgejo prevents self-approval; merge will use
force_merge: true)Review Summary
Reviewed all 6 files in this PR (2 new source modules, 2 modified source files, 1 new feature file, 1 new step definitions file) against the specification, CONTRIBUTING.md rules, and existing codebase patterns.
Specification Alignment ✅
is_first_run()correctly detects empty persona registrycreate_default_persona_for_actor()creates a "default" persona and sets it as last activeActorSelectionOverlaysupports keyboard navigation (j/k), fuzzy search (/), and confirmation (enter) as specifiedCode Quality ✅
first_run.pyfor detection/setup helpers,actor_selection_overlay.pyfor the widgetrender_actor_selection()is a pure function — testable without Textual dependencyimportlibfor optional Textual import,_FallbackStaticfor graceful degradationType Safety ✅
str | Noneunion types used correctly for optional returnsTest Quality ✅
Commit Message ✅
ISSUES CLOSED: #1007footerArchitecture Notes
on_mount()correctly checksis_first_run()BEFORE_refresh_persona_bar()— good attention to orderingApproved for merge with
force_merge: true.