Skip to content

fix: rest phone notifications only while the computer is in use - #2456

Merged
yansfil merged 3 commits into
mainfrom
feat/phone-push-while-in-use
Nov 11, 2026
Merged

yansfil merged 3 commits into
mainfrom
feat/phone-push-while-in-use

Conversation

@yansfil

@yansfil yansfil commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Leaving Hide open all day no longer keeps the phone silent.
Phone pushes rest during computer use while a desktop Needs You notification is available.
After ten idle minutes, lock, sleep or disconnect, still-waiting questions reach each phone once.

Korean Notifications settings: review the switch and both explanation lines across the full panel width.
Korean Notifications settings, Light

Review

  • Decide: The operator approved the copy; review the final Light/Dark captures before merge.
  • Risky files: hided/src/mobile/, hide-core/src/agent_state/turn.rs: per-phone consumption and withdrawal.
  • Risky files: desktop/src/main/computerUse.ts, hided/src/server.rs, wire schema: host observations and disconnect cleanup.
  • Known limit: On re-entry with only older read declarations retained, a single push can name another current declaration instead of the row lead; no missing/duplicate push was observed (follow-up).
  • Cost: One host timer; transition-only messages; at most four phone watermarks per current root. Details below.

Tests

  • Layer: Stood-in powerMonitor; shared follower judge/settle with real encrypted loopback HTTP pushes.
  • Layer: Candidate desktop settings/reload and paired browser flows exercise host, served copy and phone together.
  • Catches: Away releases nine waits once; answered/withdrawn roots send none; all desktop notices off permits pushes.
  • Catches: B/C cancellation preserves current unsent asks, per phone, through settling and overlapping HTTP sends.
  • Catches: Before-fix and planted-boundary failures reproduce lost B, repeated B and premature C. Details below.
  • Repeat: 156 focused Rust tests ×3; 3 host tests ×3; 7 web units ×3; 4 e2e flows ×3, all passed.
  • Waits: Explicit clocks, worker fences, HTTP responses, UI assertions and compositor frames; no fixed sleep.

Evidence

  • Verified: Loopback push counts/payloads, host/bridge units, scoped static checks and fresh candidate builds.
  • Verified: Isolated Korean Light/Dark native captures, persistent switch and desktop attach bridge.
  • Not verified: Physical idle/lock/suspend on macOS, Windows or Linux; unsupported Wayland gap is in INSTALL.md.
  • Not verified: Production relay/APNs or a physical phone; reconnect test covers the app hold/flush boundary.
  • Not verified: Native CPU/RSS and system-event-to-phone latency; cost statements are source-derived bounds.
  • Not verified: Direct delegation with no PRD run; captures uploaded using screenshots --no-run.
  • Not verified: Root cause of an earlier settings fixture startup failure; final settings repeats passed 3/3 (details below).
Dark settings capture

Korean Notifications settings, Dark

Verification record
  • Candidate: 206f0af8b84db464394fd9f02623bbe82d5aa0b8; the private candidate CLI reports that commit.
  • CI: required verify workflow passed, including Rust workspace, Windows checks, Linux/Windows web e2e and Windows desktop e2e.
  • Changed-web repeat job passed; design contract passed.
  • Independent review of 0f7a26c7d9..206f0af8b8: PASS; prior serious B/C and ordinary wait annotation findings closed. A supplemental review retained PASS with one minor subject-selection limit, recorded in Review and follow-up Factory가 pane을 닫으며 잠드는 Pi와 omp 작업자를 재우고 새 pane에 다시 묶지 못한다 #873. This was source/log review, without an independent test run.
  • Local Rust: 156 focused core/daemon tests passed three times; scoped Clippy including tests and formatting passed.
  • Host: 3 powerMonitor tests passed three times; web reconnect/notification bridge: 7 tests passed three times.
  • Both frontend typechecks/lints, design contract and timed-wait policy passed.
  • Candidate desktop settings/reload and attach/bridge flows each passed three repeats (6 total); private candidate exited and its state folder was removed.
  • Final candidate mobile settings and paired list/detail/reply/quick-key/push/revoke flows each passed three repeats (6 total).
  • An earlier settings run passed twice and failed once during fixture agent startup, before opening settings.
    The failure was agent_start.not_saved at the existing operation-save deadline, outside the notification paths.
    Its first-failure log and run details were preserved locally; the final committed candidate passed all three settings repeats without a retry.
  • Caller-observed HTTP cases cover all nine current waits, answered roots, list disappearance grace and queued withdrawal.
    The next delivered payload retains pending clears; activity/disconnect, Needs You switches and Always mode gate delivery.
  • After delivered A, separate and coalesced B/C settles cover B retained/C cancelled, C retained/B cancelled, both cancelled and root end.
    Two phones with different consumed boundaries remain independent.
    Settled B is delivered before pending C, and a B HTTP completion after C admission consumes only its captured boundary.
  • Additional actual-projection/HTTP probe: Seen with retained A/B, then Needs You with no new declaration, sends once with B while the row leads A; adding C on entry sends C once. Repeated away passes send nothing further. The temporary probe was removed without changing the candidate.
  • Before-fix HTTP failures reproduce the lost-B matrix and cancelled-newest coalescing case.
    Removing old-job consumption repeats B after cancelled C; reading past the settled boundary delivers pending C prematurely.
    Both mutations failed their predicted HTTP assertions, then the restored implementation passed the repeated scoped tests.
    Earlier host/bridge/mode/withdrawal/reconnect mutations also failed their predicted tests.
  • Cost per host: one one-second timer, at most two OS reads per tick, four event subscriptions, no per-input work.
    Only a transition or connection replay sends one IPC and one typed desktop frame per attached window.
    There is no runtime dispatch, blocking I/O or added work under Mutex<Runtime>.
  • Activity and demand sets follow the existing eight-client admission bound.
    Existing current-root entries retain at most four phone consumed watermarks/rested bits and one root-lifetime scalar.
    Each changed ledger pass adds one counter increment and one previous-age lookup per current declaration ID.
    The ledger maps its existing current/grace declaration IDs to observation order, with no additional set or history.
    Existing projection/grace root state has no separate count cap; this change adds fixed scalars to those existing entries.
    Settling retains one covered boundary per standing root and keeps the existing 64-root pending cap/three-second deadline.
  • Ordinary follower passes test one debt bit; away scans existing roots and current declarations, rebuilding at most four jobs per root.
    Jobs use the existing blocking workers, capturing root lifetime and settled boundary before transport.
    No new root set, payload queue, worker or timer is introduced in hided.
  • Close, follower reset/end, phone revocation/inactivity expiry and scope change withdraw responsibility.
    Host quit/disconnect releases timer/listeners/demand; relay-only holds retain eight payloads per phone and sixty-second expiry.
  • Unsupported idle sources remain in use while a desktop window is attached; suspend still reports away.
    The system support table records Linux lock polling, the Wayland limitation and what closes it.
  • Existing app_closed/legacy off spellings remain compatible; the timeout is one named constant, without a new setting.
  • Engineering principles 1, 7, 11, 12, 13, 14 and 15: remove the old rule, reuse owners, model consumption, test outcomes and bound state.
    Design principles 5 and 12: retain the settings pattern and capture Korean wrapping/legibility in both themes.
  • Full suites run in CI; local Rust/WASM checks use the shared cargo slot and scoped verification entrypoints.

@yansfil
yansfil added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 8ee63b8 Nov 11, 2026
99 checks passed
@yansfil
yansfil deleted the feat/phone-push-while-in-use branch November 11, 2026 16:42
HyunjunJeon pushed a commit to HyunjunJeon/hide that referenced this pull request Nov 12, 2026
…ith-hide#2462)

Closes with-hide/hide-private#826
Related: with-hide#2443 and with-hide#2456; unblocks verification of with-hide#2460 and with-hide#2454.

## Summary

Native checks still assume an immediate blocked-child raise and the old
phone pause explanation.
Wait for the real raised request after the approved grace, and expect
the approved computer-use description.
Close Settings and wait for the presented frame before capturing the
raised pane in either theme.

## Review

- **Decide**: budgets account for with-hide#2443's approved grace; the grace
boundary remains covered by core tests.
- **Risky files**: `session-workflow.spec.ts` retains the real
blocked-child path and exact raised-label predicate.
- **Risky files**: `phone-push-settings.spec.ts` keeps the full copy
assertion against with-hide#2456 and `UI_BEHAVIOR.md`.

## Tests

- **Layer**: native e2e checks Korean task rows, pane bands, terminal
geometry and persisted phone pause settings.
- **Catches**: old main runs fail before the 60-second grace; the first
candidate reaches the unchanged UI assertions.
- **Catches**: the same CI exposed the obsolete pause explanation on
both attempts; its assertion remains exact.
- **Repeat**: grace candidate passes once without retry; final candidate
macOS validation is pending.
- **Waits**: snapshot guard allows the 60-second grace plus its existing
30-second label budget.
- **Waits**: test guard adds that grace to its existing 90-second
budget; Settings absence is asserted before capture.
- **Waits**: existing animation/compositor helpers wait for the
presented native frame; no custom delay is added.

## Evidence

- **Verified**: first candidate PR verify passes typecheck, lint, size
budgets and timed-wait policy.
- **Verified**: its macOS session workflow passes in 94.492 seconds on
the first attempt, with every assertion intact.
- **Verified**: its native artifacts expose a stale Settings frame in
the light capture, corrected by the new gate.
- **Not verified**: final candidate CI and fixed captures are pending;
local builds exceed the 2.4 GiB disk margin.
- **Not verified**: original pre-with-hide#2443 intermittency is not
independently diagnosed; direct delegation, no PRD run.

<details><summary>Verification record</summary>

Base `8ee63b8e5138fd6aae02d987fd4563458f842d1a`; final candidate
`b897729e73`.
Before: main run 43031426412 and with-hide#2460 run 43060583267 fail the
30-second raised-label wait on both attempts.
Grace candidate `0c50b38168`:
https://github.com/with-hide/hide/actions/runs/43065626764
Mac desktop:
https://github.com/with-hide/hide/actions/runs/43065619655/job/130679676966
Shard 1 passes 64 tests, skips one; shard 2 passes 65, skips ten and
fails only the old phone-pause copy.
The original reports, native windows and failure logs are preserved
locally.
Remaining unrelated jobs in that superseded nightly were cancelled
before final-candidate validation.
Self-review: product, snapshot, lifecycle and cleanup are unchanged;
state predicates remain exact and guards finite.

</details>
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.

1 participant