Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor(actions): take rename's prompt off the TUI; drop tui from restack#1164

Open
jonnii wants to merge 1 commit into
main from
jonnii/20260605031052/take-rename-s-prompt-off-the-TUI-drop-tui-from
Open

refactor(actions): take rename's prompt off the TUI; drop tui from restack #1164
jonnii wants to merge 1 commit into
main from
jonnii/20260605031052/take-rename-s-prompt-off-the-TUI-drop-tui-from

Conversation

@jonnii

@jonnii jonnii commented Jun 5, 2026
edited
Loading

Copy link
Copy Markdown
Collaborator

Two small, self-contained steps toward keeping interactive/TUI concerns out
of the action layer:

  • rename: RenameAction took the new branch name by calling tui.PromptTextInput
    directly. Introduce a RenameHandler interface (PromptNewName) that the action
    calls when no name is given; the CLI command supplies a TUI-backed
    implementation that also owns the non-interactive guard. The action no longer
    imports internal/tui.

  • restack: the only tui use was tui.IsTTY(), which is a pure re-export of
    utils.IsTTY(). Call utils.IsTTY() directly and drop the tui import.

Both are behavior-preserving (verified by lint, cli, and integration suites).
These were the only two action files whose tui use was trivially extractable;
the rest drive real select/editor/bubbletea UIs and need per-action prompter
interfaces.


Stack

Auto-generated by Stackit

@jonnii jonnii force-pushed the jonnii/20260605031052/take-rename-s-prompt-off-the-TUI-drop-tui-from branch from 426fc3d to f4ea451 Compare June 16, 2026 10:34
@jonnii jonnii force-pushed the jonnii/20260605031052/take-rename-s-prompt-off-the-TUI-drop-tui-from branch 2 times, most recently from 1e369e5 to 12f27df Compare June 19, 2026 19:28
...stack
Two small, self-contained steps toward keeping interactive/TUI concerns out
of the action layer:
- rename: RenameAction took the new branch name by calling tui.PromptTextInput
 directly. Introduce a RenameHandler interface (PromptNewName) that the action
 calls when no name is given; the CLI command supplies a TUI-backed
 implementation that also owns the non-interactive guard. The action no longer
 imports internal/tui.
- restack: the only tui use was tui.IsTTY(), which is a pure re-export of
 utils.IsTTY(). Call utils.IsTTY() directly and drop the tui import.
Both are behavior-preserving (verified by lint, cli, and integration suites).
These were the only two action files whose tui use was trivially extractable;
the rest drive real select/editor/bubbletea UIs and need per-action prompter
interfaces.
@jonnii jonnii force-pushed the jonnii/20260605031052/take-rename-s-prompt-off-the-TUI-drop-tui-from branch from 12f27df to 86ccbdf Compare June 23, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /