Skip to content

feat: add compact Zen Mode and task renaming - #1

Merged
ProAnima merged 3 commits into
ProAnima:mainfrom
hermer29:main
Oct 14, 2026
Merged

ProAnima merged 3 commits into
ProAnima:mainfrom
hermer29:main

Conversation

@hermer29

Copy link
Copy Markdown

Cycle unfinished tasks in a content-sized Zen window, restore normal geometry on exit, and adapt task actions to available title width. Persist renamed titles through the existing sync patch and translate new UI across all locales.

Validated: frontend lint/types/build and 163 tests; desktop fmt/Clippy and 135 tests; server fmt/Clippy and 23 tests. Browser layout and native shrink/restore checked. Native geometry has no automated WebviewWindow tests. OpenSSL test linking reports existing LNK4099 debug-symbol warnings; Clippy is clean. Physical Android, live VDS rename sync, and cross-monitor DPI acceptance remain pending.

Cycle unfinished tasks in a content-sized Zen window, restore normal geometry on exit, and adapt task actions to available title width. Persist renamed titles through the existing sync patch and translate new UI across all locales.

Validated: frontend lint/types/build and 163 tests; desktop fmt/Clippy and 135 tests; server fmt/Clippy and 23 tests. Browser layout and native shrink/restore checked. Native geometry has no automated WebviewWindow tests. OpenSSL test linking reports existing LNK4099 debug-symbol warnings; Clippy is clean. Physical Android, live VDS rename sync, and cross-monitor DPI acceptance remain pending.

@ProAnima ProAnima left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the contribution — this is a careful PR. Zen Mode and renaming are well split across hooks and components, all calls go through shared/commands, there is no unwrap() outside tests, the rename is a single transaction with a sync-log patch, and the tests cover the tricky cases (stale initial response, repeated clicks, native failure, queue changes while a task is current).

I ran the full quality gate (scripts/check.ps1) on this branch: frontend 163 tests, desktop Rust 135, server 23, tsc, ESLint (no warnings) and Clippy — all green, matching your description.

Blocking: a rename does not reach other devices

rename records an update patch {"title": …}, but the receiving side ignores it: apply_plan_item in apps/desktop/src-tauri/src/server_sync/apply_entities.rs only handles status, progressPercent, planDate and isLongRunning in "update". So a task renamed on the desktop keeps its old title on the phone and on other desktops, silently. The new unit test checks that the patch is written, not that it is applied.

A failing test (add to server_sync/apply/tests.rs):

#[test]
fn remote_title_update_renames_plan_item() -> Result<(), String> {
    let conn = sync_test_conn();
    let op = |id: &str, hlc: &str, kind: &str, patch: serde_json::Value| RemoteOperation {
        device_id: "phone-device".to_string(),
        entity_id: "task-1".to_string(),
        entity_type: "plan_item".to_string(),
        hlc: hlc.to_string(),
        op: kind.to_string(),
        operation_id: id.to_string(),
        payload_ciphertext: patch.to_string(),
        schema_version: 1,
    };
    let create = op("op-1", "2026-07-07T10:00:00.000Z-0000-phone-device", "create", serde_json::json!({
        "title": "Call", "status": "open", "progressPercent": null, "planDate": "2026-07-07", "isLongRunning": false
    }));
    let rename = op("op-2", "2026-07-07T11:00:00.000Z-0000-phone-device", "update", serde_json::json!({ "title": "Call the bank" }));
    apply_remote_operation(&conn, "profile-1", "desktop-device", &create, None)?;
    apply_remote_operation(&conn, "profile-1", "desktop-device", &rename, None)?;
    let title: String = conn
        .query_row("SELECT title FROM plan_items WHERE id = 'task-1'", [], |row| row.get(0))
        .map_err(|e| e.to_string())?;
    assert_eq!(title, "Call the bank");
    Ok(())
}

On this branch it fails with left: "Call", right: "Call the bank". This fixes it — the test and all 26 server_sync tests pass with it (the existing HLC check in apply_remote_operation still keeps a stale rename from overwriting a newer local one):

         "update" => {
+            if let Some(title) = string_field(patch, "title") {
+                conn.execute(
+                    "UPDATE plan_items SET title = ?1 WHERE id = ?2",
+                    params![title, operation.entity_id],
+                )
+                .map_err(|e| e.to_string())?;
+            }
             if let Some(status) = string_field(patch, "status") {

Could you add the fix and the test to this PR?

Non-blocking

  • The window limits (280–520 × 260–1200, Zen 72–180) now live in three places: tauri.conf.json, zen_window.rs and resizeBy in shared/commands/overlay.ts. They match today, but it is easy to change one and not the others. A short comment in each place pointing to the others would be enough for now.
  • As you noted, Android, live VDS rename sync and cross-monitor DPI still need a manual check — we will do that before the release, after the fix above.

Thanks again!

ProAnima and others added 2 commits October 14, 2026 17:24
# Conflicts:
#	docs/v1-release-plan.md
Renaming records a plan_item "update" patch with a title, but the
remote apply path ignored that field, so a rename never reached other
devices. Apply it and cover it with a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@ProAnima ProAnima left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks! I pushed a merge with main and a fix for remote renames; CI is green.

@ProAnima
ProAnima merged commit 99d281e into ProAnima:main Oct 14, 2026
3 checks passed
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