Start the desktop app terminal docked on the right, and release 3.0.3

AI Assisted
This commit is contained in:
jparkerweb committed 2026-11-06 13:38:13 -08:00
1 parent 9226b82c37
commit d84d6a4690
13 files changed
+40 -39

No files matched your search

+6
View File
@@ -2,6 +2,12 @@
All notable changes to Plan2Code will be documented in this file.
## v3.0.3
### 🐛 Fixed
- **desktop app**: the terminal now starts docked on the right on a fresh install, as intended, instead of at the bottom. The app always reported a saved `bottom` dock, so the page's right-dock default never ran; it now reports nothing until a dock is saved. A dock you already chose is kept.
## v3.0.2
### ✨ Added
+1 -1
View File
@@ -13,7 +13,7 @@ the next engineer all start from the same specs.
One command opens it, every step is a card, and the terminal is always there if you prefer it.
Version 3.0.2 · MIT · 📖 [plan2code.jparkerweb.com](https://plan2code.jparkerweb.com)
Version 3.0.3 · MIT · 📖 [plan2code.jparkerweb.com](https://plan2code.jparkerweb.com)
---
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "plan2code",
"version": "3.0.2",
"version": "3.0.3",
"private": true,
"bin": {
"plan2code-install": "./install.js"
+2 -2
View File
@@ -757,7 +757,7 @@ dependencies = [
[[package]]
name = "fake-agent"
version = "3.0.2"
version = "3.0.3"
dependencies = [
"serde_json",
"terminal_size",
@@ -2371,7 +2371,7 @@ checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
[[package]]
name = "plan2code-app"
version = "3.0.2"
version = "3.0.3"
dependencies = [
"chrono",
"libc",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "fake-agent"
version = "3.0.2"
version = "3.0.3"
description = "A stand-in agent program for the Plan2Code app's tests"
edition = "2021"
publish = false
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "plan2code-app",
"version": "3.0.2",
"version": "3.0.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "plan2code-app",
"version": "3.0.2",
"version": "3.0.3",
"dependencies": {
"@tauri-apps/api": "2.12.4",
"@xterm/addon-fit": "0.11.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "plan2code-app",
"version": "3.0.2",
"version": "3.0.3",
"private": true,
"description": "Plan2Code desktop app (Tauri). Separate from the repo root so the root and the web console stay dependency-free.",
"scripts": {
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "plan2code-app"
version = "3.0.2"
version = "3.0.3"
description = "Plan2Code desktop app"
edition = "2021"
publish = false
+5 -8
View File
@@ -706,14 +706,11 @@ fn app_state(state: State<'_, AppState>) -> serde_json::Value {
.filter(known)
})
.or_else(|| project::remembered_agent().filter(known));
let term_panel = settings_file.as_ref().map_or(
settings::TermPanelSettings {
dock: settings::DEFAULT_TERM_DOCK.to_string(),
fraction: settings::DEFAULT_TERM_FRACTION,
collapsed: false,
},
|file| settings::load_term_panel(file),
);
// Null until the person has docked, dragged or collapsed the pane: the
// page then starts it docked right.
let term_panel = settings_file
.as_ref()
.and_then(|file| settings::load_term_panel(file));
let first_run_done = settings_file
.as_ref()
.is_some_and(|file| settings::load_first_run_done(file));
+16 -19
View File
@@ -21,7 +21,6 @@ pub struct TermPanelSettings {
pub collapsed: bool,
}
pub const DEFAULT_TERM_DOCK: &str = "bottom";
pub const DEFAULT_TERM_FRACTION: f64 = 0.25;
const TERM_FRACTION_MIN: f64 = 0.05;
const TERM_FRACTION_MAX: f64 = 0.9;
@@ -53,15 +52,16 @@ pub fn save_last_agent(file: &Path, id: &str) -> Result<(), String> {
write(file, settings)
}
/// The terminal pane's shape, from the file or the defaults. A dock other
/// than `bottom` or `right`, or a fraction outside its range, is the default.
pub fn load_term_panel(file: &Path) -> TermPanelSettings {
/// The terminal pane's saved shape, or `None` when no valid dock is saved (a
/// fresh install, or a dock other than `bottom` or `right`): the page then
/// picks its own default, docked right. A fraction outside its range falls
/// back to the default fraction.
pub fn load_term_panel(file: &Path) -> Option<TermPanelSettings> {
let settings = read(file);
let dock = settings
.get(TERM_DOCK_KEY)
.and_then(|v| v.as_str())
.filter(|d| *d == "bottom" || *d == "right")
.unwrap_or(DEFAULT_TERM_DOCK)
.filter(|d| *d == "bottom" || *d == "right")?
.to_string();
let fraction = settings
.get(TERM_FRACTION_KEY)
@@ -72,11 +72,11 @@ pub fn load_term_panel(file: &Path) -> TermPanelSettings {
.get(TERM_COLLAPSED_KEY)
.and_then(|v| v.as_bool())
.unwrap_or(false);
TermPanelSettings {
Some(TermPanelSettings {
dock,
fraction,
collapsed,
}
})
}
/// Save the terminal pane's shape, keeping any other key the file holds. An
@@ -202,13 +202,8 @@ mod tests {
}
#[test]
fn the_term_panel_defaults_to_bottom_at_a_quarter() {
let want = TermPanelSettings {
dock: "bottom".into(),
fraction: 0.25,
collapsed: false,
};
assert_eq!(load_term_panel(&temp_file("term-missing")), want);
fn nothing_saved_reports_no_term_panel_so_the_page_docks_right() {
assert_eq!(load_term_panel(&temp_file("term-missing")), None);
}
#[test]
@@ -219,11 +214,11 @@ mod tests {
save_term_panel(&file, "right", 0.4, true).unwrap();
assert_eq!(
load_term_panel(&file),
TermPanelSettings {
Some(TermPanelSettings {
dock: "right".into(),
fraction: 0.4,
collapsed: true
}
})
);
assert!(std::fs::read_to_string(&file)
.unwrap()
@@ -272,11 +267,13 @@ mod tests {
}
#[test]
fn a_bad_dock_or_out_of_range_fraction_on_disk_reads_as_the_default() {
fn a_bad_dock_on_disk_reads_as_nothing_saved_and_a_bad_fraction_as_the_default() {
let file = temp_file("term-bad-load");
std::fs::create_dir_all(file.parent().unwrap()).unwrap();
std::fs::write(&file, r#"{"termDock": "top", "termFraction": 5}"#).unwrap();
let loaded = load_term_panel(&file);
assert_eq!(load_term_panel(&file), None);
std::fs::write(&file, r#"{"termDock": "bottom", "termFraction": 5}"#).unwrap();
let loaded = load_term_panel(&file).unwrap();
assert_eq!(loaded.dock, "bottom");
assert_eq!(loaded.fraction, 0.25);
let _ = std::fs::remove_dir_all(file.parent().unwrap());
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Plan2Code",
"version": "3.0.2",
"version": "3.0.3",
"identifier": "com.plan2code.desktop",
"build": {
"frontendDist": "../ui",
+2 -1
View File
@@ -1,5 +1,6 @@
// The app page: the top bar, the console dashboard in an iframe, and the
// agent's terminal panel docked at the bottom with a drag handle.
// agent's terminal panel, docked right by default (or at the bottom on
// request) with a drag handle.
import { mountTerminal } from './terminal.js';
import { NEW_RELEASE_COMMAND, attentionSignal, barNextSteps, continueKeys, defaultRightFraction, folderName, lastAgentNotice, pickDefaultAgent, taskbarSwitch, windowTitleFor, deadConsoleAction, loopBanner, loopLocks, loopStopLabels, loopWindowTitle } from './meter.js';
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "Plan2Code",
"version": "3.0.2",
"version": "3.0.3",
"description": "A structured 4-step workflow methodology for AI-assisted software development",
"keywords": [
"ai",