Skip to content

feat(plan-mode): improve plan mode workflow - #92

Closed
Pepps233 wants to merge 8 commits into
plan/12-docsfrom
feat/plan-mode-workflow
Closed

Pepps233 wants to merge 8 commits into
plan/12-docsfrom
feat/plan-mode-workflow

Conversation

@Pepps233

Copy link
Copy Markdown
Contributor

Summary

Improve the interactive plan-mode workflow and move thinking-effort selection into /model.

Changes

  • accept /plan [instructions] as a planning prompt and remove the on/off controls
  • bind Shift+Tab to configurable app.plan.toggle plan-mode toggling
  • show a #6FB01C editor border while plan mode is active, with an optional planMode theme token
  • open thinking-effort selection after choosing a reasoning model through /model or Ctrl+L
  • remove thinking-effort selection from /settings
  • update interactive help, docs, tests, and theme schemas

User impact

  • /plan on and /plan off are no longer mode controls; their arguments are treated as planning instructions
  • app.thinking.cycle is replaced by app.plan.toggle
  • thinking effort is selected as part of the model-selection flow
  • existing custom themes use the #6FB01C plan-mode fallback unless they define planMode

Validation

  • npm run check
  • ./test.sh
  • focused interactive/model/plan/theme/keybinding tests
  • tmux smoke test for Shift+Tab enable/disable and model-to-thinking selector transition

@Pepps233 Pepps233 changed the title feat(coding-agent): improve plan mode workflow feat(plan-mode): improve plan mode workflow Aug 16, 2026
@Pepps233
Pepps233 requested a review from Issacboy123 August 16, 2026 20:28

@Issacboy123 Issacboy123 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separating Shift+Tab toggling, /plan <instructions>, and pending-plan decisions improves the interactive flow and fixes PR #87's missing selector. Two state boundaries are still conflated: transformed plan input is written to history, and border color lives on the active editor. Keep raw input, dispatched prompts, and history distinct, then reapply derived appearance whenever the active editor changes.

this.editor.setText("");
const planningPrompt = await this.handlePlanCommand(instructions);
if (planningPrompt === undefined) return;
text = planningPrompt;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replacing text here also changes what the later addToHistory() call records. After plan mode ends, recalling this entry submits the instructions as an ordinary write-capable prompt. Please retain the original /plan command for history and use planningPrompt only for dispatch.

if (this.isBashMode) {
this.editor.borderColor = theme.getBashModeBorderColor();
} else if (this.session.collaborationMode === "plan") {
this.editor.borderColor = theme.getPlanModeBorderColor();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This updates only the currently active editor. If collaboration mode changes while a custom editor is mounted, restoring the default editor reuses its previous border color. I think you should recompute the border after installing or restoring an editor, or derive it from current mode when mounting.

@Pepps233

Pepps233 commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Fixed by Diffex

Issue: /plan [instructions] replaced the raw command before editor history was recorded. Recalling that entry after plan mode ended could submit the instructions as a normal write-capable prompt.

  • Resolved by 6daa7b7: keeps the original /plan input as the history entry while dispatching only the extracted instructions. The regression test verifies the raw command and dispatched prompt remain distinct.

Issue: The compaction queue recorded transformed plan instructions instead of the original /plan command in editor history. This left the same unsafe recall path when planning instructions were submitted during compaction.

  • Resolved by eb8ecfc: passes a separate history entry through compaction queueing. The queue still dispatches planning instructions while history retains the explicit /plan command.

Issue: Plan-mode border updates applied only to the active custom editor. Restoring the default editor could therefore reuse a stale border from the previous collaboration mode.

  • Resolved by b0f6daf: synchronizes derived border styling across the active and default editors. Mode transitions now preserve the correct border when custom editors are installed or restored.

Issue: Plan mode used the fixed #6FB01C border while the > prompt pointer retained the normal blue selection accent. This ignored each theme's named green and made the two plan-mode indicators inconsistent.

  • Resolved by 66e381c: uses each theme's green variable for plan styling and applies it to both the border and prompt pointer. It also updates custom-theme fallbacks, documentation, and appearance regression coverage.

@Pepps233
Pepps233 requested a review from Issacboy123 August 17, 2026 22:39
@Pepps233 Pepps233 closed this Sep 7, 2026
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.

2 participants