mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 04:45:33 -08:00
Start the desktop app's agent with permission checks off by default
AI Assisted
This commit is contained in:
1 parent
b73a4cebe7
commit
a4644d533b
5 files changed
+26
-12
No files matched your search
@@ -16,6 +16,7 @@ All notable changes to Plan2Code will be documented in this file.
|
||||
- **launcher**: `plan2code` no longer treats an SSH or service session on macOS or Windows as having a desktop, and asks before opening a folder that looks like it is not a project (no `.git`, `AGENTS.md` or `specs/`).
|
||||
- **desktop app**: the app's own bar no longer repeats the open page as a second "page: " label; the console's own bar, inside the window, already names it. The web console now knows when the agent driving it is the desktop app (the same signal that already routed `open` to the app's window) and, only there, drops advice that assumed a plain terminal: its session meter, the finished-step guide and the dashboard's red-session banner point at the app's own **New Session** button instead of a command to paste into a new conversation; its own "update available" banner, a copy-pasted shell command, never shows, since **Update skills** already covers it in one click with no shell involved; and a slash command still offered to continue a step says to paste it into the app's terminal panel, which runs the real agent CLI, rather than "a new conversation" that does not exist there. Running a plain terminal is unchanged.
|
||||
- **desktop app**: dropped the bar's own context-window meter and its restart nudge, front and back: a second, separately-tuned gauge beside the console's own Session meter (how much plan2code work this session has done) read as a duplicate of it, so there is now just the one, and it already points at New Session under the app (see above). The `agent_context` command, the Claude/Codex transcript readers behind it, and the context-nudge setting it read are removed from the Rust side too, not just unwired in the page. Every button that reconnects the console (after it stops, or after Update skills) is now labeled **Reconnect the console**, replacing the earlier mix of "Restart the console" and "Start it again" for the same action, and only one shows at a time.
|
||||
- **desktop app**: the launch card's permission-mode tick is now **on by default** (checks off), matching how `plan2code` has always started an agent from the plain terminal. It previously defaulted off, the opposite of the terminal's own long-standing default; untick it for an agent that keeps its normal approval prompts.
|
||||
- **web console**: Help's "When an update is out" line now knows when it is read inside the app too: there, it names **Update skills** in the bar instead of describing the dashboard's UPDATE AVAILABLE banner and a terminal command, since that banner never shows under the app and the command has no terminal to run in.
|
||||
- **desktop app**: the top bar's **Restart** button is now **New Session**, and every place the console names it under the app (the session meter, the dashboard's red-session banner, the finished-step guide, the Welcome tip, Help's Ask and Finishing topics, the handoff copy button's description) says so too; the meter's own advice under the app is a single **Start a New Session** button in the user's highlight colour. Its confirmation no longer claims "What it was doing is not saved" (not always true).
|
||||
- **desktop app**: with nothing saved yet, the terminal panel now starts docked right at a width that keeps the console's own side panels (such as Notes) from stacking under the main content, instead of the bottom dock it always opened with before; a saved choice from before is still kept exactly as it was.
|
||||
|
||||
+8
-8
@@ -118,15 +118,15 @@ anyway**.
|
||||
**Linux.** Nothing to allow. If the file is not executable, run
|
||||
`chmod +x ~/.plan2code/app/plan2code-app`.
|
||||
|
||||
## Permission checks are off, if you choose it
|
||||
## Permission checks are off by default, same as the terminal
|
||||
|
||||
The launch card's permission-mode tick is off by default: leave it off and the agent keeps its normal
|
||||
approval prompts. Turn it on and the agent starts with checks off instead
|
||||
(`--permission-mode bypassPermissions` in Claude Code, `--permission-mode bypass` in Devin,
|
||||
`--dangerously-bypass-approvals-and-sandbox` in Codex), reading, writing and running commands in your
|
||||
project folder without asking; the status strip says so while that agent runs. Restart keeps the same
|
||||
choice. Work in a folder you are happy for the agent to change, and keep it under version control,
|
||||
before turning checks off.
|
||||
The launch card's permission-mode tick is **on by default** (checks off), matching `plan2code` run the
|
||||
plain way: the agent starts with checks off (`--permission-mode bypassPermissions` in Claude Code,
|
||||
`--permission-mode bypass` in Devin, `--dangerously-bypass-approvals-and-sandbox` in Codex), reading,
|
||||
writing and running commands in your project folder without asking; the status strip says so while that
|
||||
agent runs (the agent's **checks off** badge in the top bar). Untick it before pressing Start agent to keep the agent's normal approval prompts instead.
|
||||
New Session keeps the same choice. Work in a folder you are happy for the agent to change, and keep it under
|
||||
version control.
|
||||
|
||||
## Remove it
|
||||
|
||||
|
||||
@@ -53,8 +53,9 @@ failure.
|
||||
project folder, the skills version) before the launch card; a later launch goes straight to
|
||||
the launch card
|
||||
- [ ] The launch card offers agent, model, effort (Claude and Codex only) and permission mode
|
||||
(off is an explicit tick, never the default); a CLI it could not find is named, not just
|
||||
disabled
|
||||
(checks off is ticked by default, matching the plain `plan2code` launcher; untick it for
|
||||
an agent that keeps its normal approval prompts); a CLI it could not find is named, not
|
||||
just disabled
|
||||
- [ ] **Dock the terminal to the right**: the splitter becomes vertical, the toolbar stacks, and the
|
||||
dashboard keeps the rest of the width; dock it back to the bottom
|
||||
- [ ] **Collapse** the terminal to a thin strip (either dock) and **Expand** it back; its size from
|
||||
|
||||
@@ -234,10 +234,10 @@
|
||||
<select id="launch-effort"></select>
|
||||
</div>
|
||||
<label id="launch-bypass-row">
|
||||
<input id="launch-bypass" type="checkbox">
|
||||
<input id="launch-bypass" type="checkbox" checked>
|
||||
Turn permission checks off for this agent
|
||||
</label>
|
||||
<p id="launch-bypass-warning" hidden>Permission checks will be off: the agent can run commands and change files without asking first.</p>
|
||||
<p id="launch-bypass-warning">Permission checks will be off: the agent can run commands and change files without asking first.</p>
|
||||
<button id="launch-start" type="submit">Start agent</button>
|
||||
</form>
|
||||
</main>
|
||||
|
||||
@@ -95,6 +95,18 @@ test("the context-window meter is gone for good: no stray element, poll, or back
|
||||
}
|
||||
});
|
||||
|
||||
test("the launch card's permission-mode tick starts checked (off), matching the plain terminal launcher's own always-off default", () => {
|
||||
assert.match(
|
||||
INDEX_HTML,
|
||||
/<input id="launch-bypass" type="checkbox" checked>/,
|
||||
"the checkbox markup itself must carry `checked`, not something app.js sets later"
|
||||
);
|
||||
// The warning sentence starts visible along with it: no `hidden` attribute on this element.
|
||||
assert.match(INDEX_HTML, /<p id="launch-bypass-warning">Permission checks will be off/);
|
||||
// Nothing in app.js resets it back to unchecked on every card show.
|
||||
assert.doesNotMatch(APP_JS, /launchBypassEl\.checked\s*=\s*false/, "no reset back to unchecked anywhere");
|
||||
});
|
||||
|
||||
test("windowTitleFor names the project folder after Plan2Code, so two or more windows read apart in a taskbar", () => {
|
||||
assert.equal(windowTitleFor("C:\\git\\azw3-to-pdf"), "Plan2Code - azw3-to-pdf");
|
||||
assert.equal(windowTitleFor("/home/me/projects/plan2code"), "Plan2Code - plan2code");
|
||||
|
||||
Reference in new issue
Block a user