[PF-24] Advisory messages, plan loading spinner, and spinner module - #43
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
chucoding
added a commit
that referenced
this pull request
Mar 18, 2026
* [PF-24] Configurable stream timeout and config merge from template JSON [PF-24] Configurable stream timeout and config merge from template JSON * [PF-24] Advisory messages, plan loading spinner, and spinner module (#43) * fix : high effort plan mode timeout (300 => 360) * refactor : print information message before run cursor sandbox * feat : add spinner in plan mode * refactor : spinner moduleration * [PF-26] Fixing planforge doctor errors on Mac (#44) * fix : planforge run in mac os * chore : Change the Planforge Doctor TC1 question to one that a real user would be likely to ask. * chore : improve CI Build error * fix : python error * chore : improve CI GuardRail * chore : CRLF => LF * fix : add codex error process (Authentication/Usage/Execution Failure) * fix : add codex error process (Authentication/Usage/Execution Failure)(python) * [PF-15] Doctor first screen simplified; doctor ai uses planforge.json and planforge model flow (#45) * feat : sync doctor ai config model * fix : improve plan mode rule * refactor : integration model selector and doctor ai * refactor : remove no use file * chore : PR writing rule change lang(ko=>en) * fix : build error * release : v0.1.8 (#46)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Improve UX when running plan/implement in the Cursor sandbox: (1) show user-language advisories before running (via skills), (2) show a loading spinner during plan execution until the first stream chunk, and (3) share spinner logic in a common module. Also increase high-effort stream timeout and document timeout vs spinner.
Description
High effort timeout: Default planner/implementer stream timeout for
higheffort increased from 300s to 360s inpackages/cli-js/src/config/timeout.tsandpackages/cli-py/planforge/utils/config.py.Advisory messages (skill-based i18n):
plan.ts,implement.ts,plan.py,implement.py)..cursor/skills/p/SKILL.md,.cursor/skills/i/SKILL.md, and template copies undertemplates/cursor/skills/,packages/cli-js/templates/cursor/skills/) so the agent outputs a one-line advisory in the user’s language before running the plan/implement script.Plan loading spinner:
onFirstChunk?: () => voidtoPlanOpts(registry). Claude and Codex providers call it once on the first non-empty stream chunk.plan.ts: when stdout is TTY, start a spinner (createSpinner({ prefix: "Loading... " })), passonFirstChunk: () => spinner.stop(), and callspinner.stop()infinally.plan.py: when stdout is TTY, print"Loading..."(flush) before calling the planner.Spinner module:
packages/cli-js/src/utils/spinner.ts:createSpinner(options?)returns{ start(), stop(), clear() }with configurable prefix, intervalMs (default 80), stream, and onlyWhenTty.plan.tsandcommands/doctor.tsto usecreateSpinnerinstead of inline spinner code.cli-js/src/config/timeout.ts,cli-py/planforge/utils/config.pycli-js/src/providers/registry.ts,claude.ts,codex.tscli-js/src/commands/plan.ts,doctor.ts,cli-py/planforge/commands/plan.pycli-js/src/utils/spinner.ts(new).cursor/skills/p/SKILL.md,i/SKILL.md, and template copiesHow to test
highinplanforge.json, runplanforge plan "<goal>"and confirm the run can proceed past 300s (e.g. up to 360s) when the provider is slow./por/iin Cursor; confirm the agent prints a one-line advisory in the same language as your message before the plan/implement command runs.planforge plan "<goal>"in a TTY; confirm "Loading... |/-" appears until the first streamed output, then the line is cleared and plan output continues.planforge doctorand choose AI mode; confirm the "response:" spinner behaves as before (spinner then PASS/FAIL).planforge plan "<goal>"via the Python CLI in a TTY; confirm "Loading..." is printed before plan output.Review Requirement
onFirstChunkis only invoked once per run (first non-empty chunk) in both Claude and Codex..cursor/skills/,templates/cursor/skills/, andpackages/cli-js/templates/cursor/skills/for both p and i.Additional Info