Open homepage applies bookmark edits on its own #235

Merged
merge-queue merged 2 commits from myho-2-auto-refresh into main 2026-11-28 01:30:32 -08:00
Owner

An open homepage now picks up a bookmark edit made anywhere else without a click on the sync dot.

Work package: https://openproject.home.romaine.life/wp/MYHO-2

Added

  • The tab re-reads the tree when it comes into view or gains focus, and every 30 s while visible.
  • A changed tree is swapped in at once when the terminal is idle (empty query, no scope, no prompt mode or / pop-up; new isIdle() in fzh-terminal.js). While something would be lost (typing, a scope, edit mode, the diff modal) it waits behind the dot, and a 1 s check swaps it in as soon as that ends.
  • These reads return nothing on a 401 or an outage, so an expired session never shows as an empty list; a read older than the version already held (a save landed mid-read) is dropped.
  • Entering edit mode applies a pending tree first, so an edit can't overwrite a newer version without a conflict.

Changed

  • Page load with a cache and :sync go through the same path: no more "click dot".

Left alone

  • The dot and its diff modal, saves, conflict handling, the no-cache first load, playground and baked modes.

Tested in a browser-test pod against a stand-in auth and tree server: idle tab applies on focus; typing holds the change behind the dot and it applies on clearing the query; 401 and 500 keep the list; a stale read is dropped; the 30 s timer fires on its own.

🤖 Generated with Claude Code

An open homepage now picks up a bookmark edit made anywhere else without a click on the sync dot. Work package: https://openproject.home.romaine.life/wp/MYHO-2 **Added** - The tab re-reads the tree when it comes into view or gains focus, and every 30 s while visible. - A changed tree is swapped in at once when the terminal is idle (empty query, no scope, no prompt mode or `/` pop-up; new `isIdle()` in `fzh-terminal.js`). While something would be lost (typing, a scope, edit mode, the diff modal) it waits behind the dot, and a 1 s check swaps it in as soon as that ends. - These reads return nothing on a 401 or an outage, so an expired session never shows as an empty list; a read older than the version already held (a save landed mid-read) is dropped. - Entering edit mode applies a pending tree first, so an edit can't overwrite a newer version without a conflict. **Changed** - Page load with a cache and `:sync` go through the same path: no more "click dot". **Left alone** - The dot and its diff modal, saves, conflict handling, the no-cache first load, playground and baked modes. Tested in a `browser-test` pod against a stand-in auth and tree server: idle tab applies on focus; typing holds the change behind the dot and it applies on clearing the query; 401 and 500 keep the list; a stale read is dropped; the 30 s timer fires on its own. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Open homepage applies bookmark edits on its own (MYHO-2)
Some checks failed
Suite web-app / scope (pull_request) Has been cancelled
Suite web-app / check-image (pull_request) Has been cancelled
Suite web-app / publish (pull_request) Has been cancelled
Suite web-app / publish-static (pull_request) Has been cancelled
Suite web-app / reused-checks (pull_request) Has been cancelled
Suite default / scope (pull_request) Has been cancelled
Suite default / check-fetches (pull_request) Has been cancelled
Suite default / check-rules (pull_request) Has been cancelled
Suite default / reused-checks (pull_request) Has been cancelled
Checks / check-conventions (pull_request) Has been cancelled
Suite cluster-service / publish (push) Has been skipped
Suite cluster-service / reused-checks (push) Has been skipped
Suite tofu / scope (push) Has been skipped
Suite tofu / check-plan (push) Has been skipped
Suite tofu / apply (push) Has been skipped
Suite tofu / reused-checks (push) Has been skipped
Suite web-app / check-image (push) Has been skipped
Suite web-app / scope (push) Has been skipped
Suite web-app / publish (push) Has been skipped
Suite web-app / publish-static (push) Has been skipped
Suite cluster-service / scope (pull_request) Has been cancelled
Suite cluster-service / check-manifests (pull_request) Has been cancelled
Suite cluster-service / check-image (pull_request) Has been cancelled
Suite cluster-service / publish (pull_request) Has been cancelled
Suite cluster-service / reused-checks (pull_request) Has been cancelled
Suite web-app / reused-checks (push) Has been skipped
Suite tofu / scope (pull_request) Has been cancelled
Suite tofu / check-plan (pull_request) Has been cancelled
Suite tofu / apply (pull_request) Has been cancelled
Suite tofu / reused-checks (pull_request) Has been cancelled
5eb50bc3c0
Re-read the tree when the tab comes into view and every 30s while visible,
and swap a changed tree in once the terminal is idle; the sync dot only
holds it while a query, scope, edit or the diff is open. A 401 or outage
never reads as an empty list, a read older than the held version is
dropped, and entering edit mode applies a pending tree first.
Merge branch 'main' into myho-2-auto-refresh
All checks were successful
Suite tofu / scope (push) Has been skipped
Suite tofu / check-plan (push) Has been skipped
Suite tofu / apply (push) Has been skipped
Suite tofu / reused-checks (push) Has been skipped
Suite web-app / scope (push) Has been skipped
Suite web-app / check-image (push) Has been skipped
Suite web-app / publish (push) Has been skipped
Suite web-app / publish-static (push) Has been skipped
Suite web-app / reused-checks (push) Has been skipped
Suite default / check-rules (pull_request) Has been skipped
Suite tofu / scope (pull_request) Successful in 34s
Suite tofu / apply (pull_request) Has been skipped
Suite cluster-service / reused-checks (pull_request) Successful in 34s
Suite cluster-service / check-manifests (pull_request) Has been skipped
Suite cluster-service / scope (pull_request) Successful in 28s
Suite tofu / reused-checks (pull_request) Successful in 34s
Suite default / reused-checks (pull_request) Successful in 35s
Suite cluster-service / publish (pull_request) Has been skipped
Suite tofu / check-plan (pull_request) Has been skipped
Checks / check-conventions (pull_request) Successful in 10s
Suite web-app / scope (pull_request) Successful in 35s
Suite cluster-service / check-image (pull_request) Has been skipped
Suite default / scope (pull_request) Successful in 34s
Suite web-app / publish (pull_request) Has been skipped
Suite web-app / publish-static (pull_request) Has been skipped
Suite web-app / check-test (backend) (pull_request) Successful in 45s
Suite web-app / reused-checks (pull_request) Successful in 29s
Suite default / check-fetches (pull_request) Has been skipped
Suite web-app / check-image (pull_request) Successful in 1m21s
merge-queue landed on main
ffb732a295
merge-queue deleted branch myho-2-auto-refresh 2026-11-28 01:30:33 -08:00
Sign in to join this conversation.
No description provided.