claudewheel v0.15.1 /claudewheel.app
Edit
On this page

App class -- TUI event loop for claudewheel.

#claudewheel.app

#claudewheel.app

TUI event loop, keyboard dispatch, and segment interaction.

#App

TUI application managing the event loop, keyboard handling, and segment interaction.

#run_tui

python
def run_tui(self) -> dict[str, str | None] | None

Enter the TUI loop. Returns selections on launch, None on quit.

#_promote_ephemeral

python
def _promote_ephemeral(self) -> None

Promote ephemeral selections to pinned on disk before launch.

#_run_slow_discovery_thread

python
def _run_slow_discovery_thread(self) -> None

Background thread: run slow discovery and store results.

#_apply_slow_discovery

python
def _apply_slow_discovery(self) -> None

Merge slow discovery results into the live segment bar.

Results for the focused segment are deferred to avoid disrupting the user's current interaction. Unfocused segments are updated immediately.

Known limitation: while results are buffered, evaluate_requires() uses the focused segment's pre-discovery options for cross-segment constraint checks. Constraint-based dimming may be briefly stale until defocus.

#_apply_pending_for_segment

python
def _apply_pending_for_segment(self, seg: Segment) -> None

Apply any deferred discovery results for seg and clear pending state.

#_defocus

python
def _defocus(self) -> None

Run deferred-apply housekeeping on the segment about to lose focus.

#_handle_key

python
def _handle_key(self, key: str) -> str | None

Process a keypress and return an action string or None to continue.

#_handle_freeform_key

python
def _handle_freeform_key(self, key: str, seg: Segment) -> str | None

Handle keystrokes in freeform editing mode (search buffer active on a freeform segment).

#_handle_install_key

python
def _handle_install_key(self, key: str) -> str | None

Handle keystrokes during install confirmation.

#_launch_profile_wizard

python
def _launch_profile_wizard(self, seg: Segment) -> str | None

Exit TUI, run the profile wizard, create profile, return to TUI.

#_handle_create_key

python
def _handle_create_key(self, key: str, seg: Segment) -> str | None

Handle keystrokes while in creation mode.

#_confirm_create

python
def _confirm_create(self, seg: Segment) -> None

Confirm creation of a new option.