diff --git a/CHANGELOG.md b/CHANGELOG.md index fab6bb6..7f290b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ All notable changes to Plan2Code will be documented in this file. - **web console**: a plan's **Build order** card has a **Combine phases** button beside **No changes**. One click fills the box with a request to merge phases where possible while keeping each to a clear concern. It shows only in Plan and Revise plan, where the breakdown is phases. - **web console**: Help now reads right in the desktop app throughout, not just in the topics fixed before: what this page is and how long it runs, the troubleshooting table and its diagram, scroll memory, drafts, the session meter's red advice, Ask's "no agent" line and Privacy's link and address notes all name the app's window, its terminal panel, **New Session** and **Reconnect the console** instead of a browser tab, a link or a new conversation. The status line's approval hint says "the terminal panel" there too. In a browser, Help is unchanged. - **desktop app**: the top bar's buttons now look like the console's own: rounded, quiet until hovered, then in your highlight color from User Preferences (the app keeps it for the next launch), with **New Session** outlined in it as the likely next step. +- **desktop app**: the New Session confirmation shows Planny, drawn like the console's own (outlined shell, star eye, smile), holding a steaming cup of coffee, and its buttons use the console's style: **New Session** in your highlight colour, **Cancel** a plain button. The same highlight applies to the panel's other one-button prompts, such as **Retry** and **Reconnect the console**. - **desktop app**: the top bar is rebuilt around two menus and one next step. The project shows as its folder name, with the full path and **Change project** in its menu; **New Session** always sits just left of the agent's menu, which carries a state dot, an amber **checks off** badge in place of the "Permission checks are off for ..." sentence, and **Change agent** once the agent has ended. The console's and the skills' messages share one slot at the right end that shows the most pressing step with its button (**Reconnect the console**, **Update skills**) and "+N more" for the rest, so the bar no longer overflows when several things go wrong at once. The repeated "Plan2Code" label, the full path, the "agent:" prefix and the long "Nothing starts until you press New Session" line are gone. ## v2.11.1 diff --git a/plan2code-app/RELEASE-CHECKLIST.md b/plan2code-app/RELEASE-CHECKLIST.md index 3c5202d..b57766a 100644 --- a/plan2code-app/RELEASE-CHECKLIST.md +++ b/plan2code-app/RELEASE-CHECKLIST.md @@ -93,7 +93,7 @@ Do each of Claude Code, Devin and Codex for a few minutes: ## Agent lifecycle -- [ ] Start, then **New Session**: it confirms once, with no claim about unsaved +- [ ] Start, then **New Session**: it confirms once, with Planny on a coffee break and no claim about unsaved work, then a fresh agent starts on the same agent, model, effort and permission mode, and the dashboard shows the pick-up chip with a brief that matches the session - [ ] An agent that ends by itself leaves the app asking nothing until New Session or **Change agent** diff --git a/plan2code-app/ui/app.js b/plan2code-app/ui/app.js index 11578db..f1dc2e0 100644 --- a/plan2code-app/ui/app.js +++ b/plan2code-app/ui/app.js @@ -41,6 +41,7 @@ const nextStepBtn = document.getElementById('next-step-button'); const nextStepMoreEl = document.getElementById('next-step-more'); const frame = document.getElementById('console-frame'); const stateBox = document.getElementById('dashboard-state'); +const statePlannyEl = document.getElementById('dashboard-state-planny'); const stateText = document.getElementById('dashboard-state-text'); const stateButton = document.getElementById('dashboard-state-button'); const stateCancelEl = document.getElementById('dashboard-state-cancel'); @@ -252,7 +253,8 @@ function confirmRestart(onYes) { showState('The agent is restarting on a fresh context window. Please wait for the dashboard to load.'); onYes(); }, - () => (frameReady ? hideState() : showState('No dashboard has loaded yet.')) + () => (frameReady ? hideState() : showState('No dashboard has loaded yet.')), + { tired: true } ); } @@ -609,9 +611,13 @@ async function onNoHello() { } } -function showState(text, buttonLabel, onButton, onCancel) { +function showState(text, buttonLabel, onButton, onCancel, { tired = false } = {}) { hideLaunchCard(); hideFirstRun(); + // statePlannyEl is an : unlike HTMLElement, it does not reflect the + // `.hidden` property to the attribute, so toggling the property alone left + // `hidden` in the markup forever. The attribute itself always works. + statePlannyEl.toggleAttribute('hidden', !tired); stateText.textContent = text; stateButton.hidden = !buttonLabel; stateButton.textContent = buttonLabel || ''; diff --git a/plan2code-app/ui/index.html b/plan2code-app/ui/index.html index c2e2327..194eff1 100644 --- a/plan2code-app/ui/index.html +++ b/plan2code-app/ui/index.html @@ -88,6 +88,49 @@ #dashboard-state { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: #1e1e1e; text-align: center; padding: 16px; box-sizing: border-box; } #dashboard-state[hidden] { display: none; } #dashboard-state-text { margin: 0; max-width: 60ch; overflow-wrap: anywhere; color: #bbb; } + #dashboard-state-planny[hidden] { display: none; } + /* Drawn and coloured like the console's own Planny (styles/planny.css): + an outlined shell, the star eye, a lip of a smile, round hands. */ + #dashboard-state-planny { width: 104px; height: auto; overflow: visible; } + #dashboard-state-planny :is(.ps-shell, .ps-smile, .ps-arm path, .ps-mug, .ps-handle) { + fill: none; stroke: var(--ink-2); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; + } + #dashboard-state-planny .ps-shell { fill: var(--panel-2); } + #dashboard-state-planny .ps-smile { stroke-width: 0.9; } + #dashboard-state-planny .ps-arm path { stroke-width: 1.2; } + #dashboard-state-planny :is(.ps-arm circle, .ps-foot) { fill: var(--ink-2); stroke: none; } + #dashboard-state-planny .ps-eye { fill: var(--ink); } + #dashboard-state-planny .ps-mug { fill: var(--panel-2); stroke-width: 1; } + #dashboard-state-planny .ps-handle { stroke-width: 0.9; } + #dashboard-state-planny .ps-coffee { fill: #9a6b47; } + #dashboard-state-planny .ps-steam path { + fill: none; stroke: var(--ink-3); stroke-width: 0.7; stroke-linecap: round; + animation: ps-steam 2.4s ease-in-out infinite; opacity: 0; + } + #dashboard-state-planny .ps-steam path:nth-child(2) { animation-delay: 0.8s; } + #dashboard-state-planny .ps-steam path:nth-child(3) { animation-delay: 1.6s; } + @keyframes ps-steam { + 0% { opacity: 0; transform: translateY(1px); } + 35% { opacity: 0.9; } + 100% { opacity: 0; transform: translateY(-2.4px); } + } + @media (prefers-reduced-motion: reduce) { + #dashboard-state-planny .ps-steam path { animation: none; opacity: 0.8; } + } + /* The console's buttons (.btn, with .primary for the way forward): the + one action wears the highlight, Cancel is a plain button. */ + #dashboard-state-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; } + #dashboard-state-actions button { + appearance: none; font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.2; + padding: 7px 13px; border-radius: 8px; cursor: pointer; + border: 1px solid var(--rule-2); background: var(--panel); color: var(--ink); + transition: filter 0.12s, background 0.12s; + } + #dashboard-state-actions button:hover { background: var(--panel-2); } + #dashboard-state-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } + #dashboard-state-actions #dashboard-state-button { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } + #dashboard-state-actions #dashboard-state-button:hover { background: var(--accent); filter: brightness(1.08); } + #dashboard-state-actions button[hidden] { display: none; } #launch-card { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; @@ -207,8 +250,29 @@