connect() registers window surfaces in a loop that reads the foreground
window once, before the loop, then awaits each surface's configure call
before queuing its visibility. On a fresh process restoreOpenApps runs at
the same time and focuses windows as it relaunches them. The bridge runs
Java calls in order, so a visibility decided before the await lands after
the focus change's own calls and undoes them: the old foreground can stay
visible and cover the new one, and a later window switch doesn't clear
it, because a switch only hides the window being left.
configureWindowSurface now also accepts visibility as a function, asked
after the configure call, when the visibility call is queued. The display-
attach loops (glasses and preview), the display-mode, per-app layout and
vertical-position changes, and an in-process window's height-mode change
pass one. Launch paths that pass a literal false are unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The native session already clears silent mode on touchpad input and re-reads it on every battery poll, so the TypeScript-side clearing duplicated that. The display-target trigger was also wrong: the communicator stays up in silent mode, so it cleared the flag on the next shell render.
Open EvenHub once without finishing sign in and the phone side form comes back
on every app start, with no way to close it. Back exits the app rather than
closing the form.
Three things combine:
- EvenHubStoreLayer.paint() opened the credential editor on its first paint
when no credentials were stored. First paint includes the restore of a
still-open EvenHub at startup, so an unfinished sign in put the form back
every time. handleInput already opens it on a click, so the auto open only
removed the choice of when.
- LayerActions.startTextSettingsEdit declares a fifth onCancel parameter, but
the DashboardController wiring forwarded four and the method accepted four.
Nothing failed to compile, because a 4-parameter function is assignable to a
5-parameter function type. That callback resets openCredentialEditor's
phoneEditor guard, so with it dropped the guard latched at "credentials":
the screen timeout hid the panel without resetting the state behind it, and
the form could then be neither closed nor reopened. ios-preview-controller.ts
already forwards all five, so this was the G2 path only.
- The panel has no Cancel control, so the keyboard's Done key on the password
field is the only way to end the edit. On an untouched form that reached
submitCredentials, which called enterLogin("Email and password are
required."), which reopens the editor. A loop with no exit.
The auto open is removed; onCancel is forwarded, stored and fired from
endTextSettingEdit, with finishTextSettingEdit clearing it first so a completed
edit does not also report a cancel; and a wholly empty submission is treated as
a cancel. A half-filled form is a real mistake and still reopens with the
message.
tests/evenhub-signin.test.cjs covers the open and close contract through the
existing load-typescript.cjs loader. Two of its five tests fail against the
current store-layer.ts and pass with this change.
<details>
<summary>Prompts Used</summary>
User: This checkout corresponds to https://github.com/jimrandomh/faceclaw/pull/27. Review this branch.
GPT-6 Astra:
> Found one issue:
>
> - **[P2] Wait for Whisper’s final result before completing dictation** — [FaceclawVoiceController.java:729](/Users/jbabcock/repositories/g2/faceclaw/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawVoiceController.java:729). Skipping partial decodes leaves short utterances without text until release, but the dialog still finalizes after its existing timeout. If decoding exceeds roughly 2.7 seconds (native stop’s 1.5-second wait plus the dialog’s 1.2-second timeout), auto-send can abandon a short command or send an incomplete longer one. Continue can append the late editing instruction literally instead of refining the message. I reproduced these outcomes with delayed transcript events. These flows should await recognition completion.
>
> Validation: TypeScript and a clean Android build passed. All 21 test failures also occur on `main`. Actual Whisper latency was not tested on hardware.
<hr>
User: Thanks, let's fix that issue.
GPT-6 Astra:
> Fixed. Dictation now waits for native recognition to finish before fallback timers run. Auto-send, Continue, and AI Chat preserve delayed Whisper results; cancellation ignores late transcripts.
>
> TypeScript and Android builds pass. All 11 new regression tests pass. The full suite still has the same 21 pre-existing failures.
</details>