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(create): route insert's child-select prompt through the Handler#1241

Open
jonnii wants to merge 1 commit into
jonnii/20260605032227/extract-OpenEditor-into-internal/editor-out-of from
jonnii/20260605033020/route-insert-s-child-select-prompt-through-the
Open

refactor(create): route insert's child-select prompt through the Handler #1241
jonnii wants to merge 1 commit into
jonnii/20260605032227/extract-OpenEditor-into-internal/editor-out-of from
jonnii/20260605033020/route-insert-s-child-select-prompt-through-the

Conversation

@jonnii

@jonnii jonnii commented Jun 16, 2026
edited
Loading

Copy link
Copy Markdown
Collaborator

handleInsert prompted the user (tui.PromptSelect) to choose which child
branch to move onto a newly inserted branch — importing internal/tui into
the action layer. create already has a Handler with prompt methods
(PromptStageChanges, PromptScope) implemented by the CLI handlers, so add a
PromptChildToMove(children) method the same way:

  • create.Handler + NullHandler gain PromptChildToMove (null returns "all").
  • The CLI SimpleCreateHandler returns "all"; InteractiveCreateHandler builds
    the select options and calls tui.PromptSelect.
  • handleInsert takes the handler and calls h.PromptChildToMove, gated on
    h.IsInteractive() (replacing the inline utils.IsInteractive + tui usage).

create/insert.go no longer imports internal/tui or internal/utils (now
9 tui-importing action files). Behavior preserved (lint, create unit tests,
integration 494).


Stack

Auto-generated by Stackit

@jonnii jonnii force-pushed the jonnii/20260605032227/extract-OpenEditor-into-internal/editor-out-of branch from 84fd7a2 to fc960f1 Compare June 17, 2026 01:51
@jonnii jonnii changed the base branch from jonnii/20260605032227/extract-OpenEditor-into-internal/editor-out-of to main June 17, 2026 01:51
@jonnii jonnii force-pushed the jonnii/20260605033020/route-insert-s-child-select-prompt-through-the branch from 2b26158 to e62efd4 Compare June 17, 2026 01:51
@jonnii jonnii changed the base branch from main to jonnii/20260605032227/extract-OpenEditor-into-internal/editor-out-of June 17, 2026 01:51
@jonnii jonnii changed the base branch from jonnii/20260605032227/extract-OpenEditor-into-internal/editor-out-of to main June 19, 2026 19:28
@jonnii jonnii force-pushed the jonnii/20260605032227/extract-OpenEditor-into-internal/editor-out-of branch from fc960f1 to 5df6aad Compare June 19, 2026 19:28
@jonnii jonnii force-pushed the jonnii/20260605033020/route-insert-s-child-select-prompt-through-the branch from e62efd4 to 92604ba Compare June 19, 2026 19:28
@jonnii jonnii changed the base branch from main to jonnii/20260605032227/extract-OpenEditor-into-internal/editor-out-of June 19, 2026 19:28
@jonnii jonnii force-pushed the jonnii/20260605033020/route-insert-s-child-select-prompt-through-the branch from 92604ba to b27a76b Compare June 23, 2026 02:14
@jonnii jonnii force-pushed the jonnii/20260605032227/extract-OpenEditor-into-internal/editor-out-of branch from 5df6aad to cc86016 Compare June 23, 2026 02:14
@jonnii jonnii changed the base branch from jonnii/20260605032227/extract-OpenEditor-into-internal/editor-out-of to main June 23, 2026 02:14
@jonnii jonnii changed the base branch from main to jonnii/20260605032227/extract-OpenEditor-into-internal/editor-out-of June 23, 2026 02:14
handleInsert prompted the user (tui.PromptSelect) to choose which child
branch to move onto a newly inserted branch — importing internal/tui into
the action layer. create already has a Handler with prompt methods
(PromptStageChanges, PromptScope) implemented by the CLI handlers, so add a
PromptChildToMove(children) method the same way:
- create.Handler + NullHandler gain PromptChildToMove (null returns "all").
- The CLI SimpleCreateHandler returns "all"; InteractiveCreateHandler builds
 the select options and calls tui.PromptSelect.
- handleInsert takes the handler and calls h.PromptChildToMove, gated on
 h.IsInteractive() (replacing the inline utils.IsInteractive + tui usage).
create/insert.go no longer imports internal/tui or internal/utils (now
9 tui-importing action files). Behavior preserved (lint, create unit tests,
integration 494).
@jonnii jonnii changed the base branch from jonnii/20260605032227/extract-OpenEditor-into-internal/editor-out-of to main June 24, 2026 02:38
@jonnii jonnii force-pushed the jonnii/20260605033020/route-insert-s-child-select-prompt-through-the branch 2 times, most recently from b27a76b to 7ed395c Compare June 24, 2026 02:38
@jonnii jonnii changed the base branch from main to jonnii/20260605032227/extract-OpenEditor-into-internal/editor-out-of June 24, 2026 02:38
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 によって変換されたページ (->オリジナル) /