Repository navigation
Conversation
…ck brings them what the agent has out of sight An agent that had shown the user its Safari tab took that tab `away` again, which closed it in the user's window while they were looking at it. A click on Safari's Dock icon then brings nothing: Safari opens no window for it while it has one, and the one it had was on the agent's desktop. - `away` no longer closes the tab its window shows, in a window that has tabs of the user's too or after the agent showed them the tab. The tab stays open, and the agent goes on in a copy of its page on its desktop. When the page comes back, at `show` or when the turn ends, it comes into that tab if it is still at its address, so show after show leaves one tab and not a row of them. It comes into a new tab if the user went on in theirs, or if they are looking at theirs and the page has moved on: nothing changes under their eyes unless the agent shows it to them. - ucu-window reports a plain click on the Dock icon of a browser the chat works in, with whether the browser was in front already and whether a window of it was in the user's sight. For Safari the server then opens each page the chat has away in a tab of the user's own window as well, in front, and the agent keeps its own. For Chrome the chat's window comes to the user's screen, as `show` brings it. Clicking again opens nothing new. - A click on the Dock icon of an app that is in front already, with its windows on the agent's desktop, brings them back to the user. Nothing comes forward for such a click, so nothing did before. - A press that is held, moved or made with a modifier key is not a click for this. The server's part has unit tests with the stand-ins for Safari, Chrome and ucu-window. No test covers ucu-window itself, and its part was only compiled: it ignores clicks that name a sender, so it needs a click by the user's own hand. Nothing here ran in a real Safari or Chrome.
Snapshot of the work as it stood on 2026-11-25, so it is no longer only in a working copy. ucu-island draws prompts at the MacBook notch and keeps an encrypted vault of logins and keys. The server gains the ask_user and vault tools, and the browser tools report which sign-in options a page offers. 189 unit tests pass. The passkey step brings the browser to the user and clicks by script, which Safari doesn't take as a user's click. The commits that follow replace it with the steps that were measured to work.
The notch work started from main before the fixes of 25 November. Both sides added methods at the same place in the server, kept one after the other, and both named one ask_user: the notch tool's is notch_ask now, and the tool keeps its name. The notch work sent "front" with "allow" to bring a shown tab forward, a key the helper already answers as a question, so the two show paths send "allow" alone, as on main. 219 unit tests pass.
…touch The passkey step brought the browser to the user, clicked the page's button by script and lit the notch at once. Safari takes no scripted click for a passkey, so no sheet opened, and the notch asked for a touch that nothing could read. Measured on Safari on 25 November 2026: a page opens the sheet only for a press made while Safari is the active app, and the sheet reads the finger only while it is, wherever its window is. So the chat's tab goes to its private desktop, the helper makes Safari the active app in a pause of the user's with that window as its main one, which moves nothing on their screen, and the button gets a real press. The notch lights when the helper sees the sheet, names the site, and says "Pause, then touch" while the user's own input keeps Safari from the front. Their app is back at whatever they do, when the sheet closes, and on every other way out. Nobody touching for 90 seconds cancels the sheet. A key the user presses while Safari has the front goes to the sheet: the helper can't catch it or send it on without a permission to read the keyboard, which ucu doesn't ask for. So the pause before Safari takes the front is 1.2 s for keys, and 4 s once a key has ended one. Chrome isn't measured, so there the window comes to the user, who touches in it. ask_user with kind passkey takes the same way and no longer lights the notch by itself.
…e front back at the touch Live runs on Safari showed three things the first version got wrong. macOS doesn't activate an app for a helper in the background, so the passkey sheet never opened. Asking the app itself worked for the first arming, but on a second one, with the sheet open, it brought a window of the user's over their app for half a second. The app now comes forward by the one window on the agent's desktop, as it does when that window is clicked, and the window is given the keyboard, without which the page says it has no focus. The user's windows stayed where they were in every run. Safari keeps the sheet up for 1.4 s after it has read the finger, to say it is done. The helper tells that moment by a button of the sheet that can no longer be pressed, gives the user's app back then, and the notch clears. The result says whether the sheet took a touch or closed without one. What the user does is looked for a hundred times a second instead of thirty, so that the key after a shortcut's modifier finds their app in front again more often.
…e sensor the pause A user who typed on for eight seconds got nothing pressed and no word of it. Now the notch asks them to pause after a second, and the step waits for that pause for as long as it would wait for the touch. The user asked not to have to stop for the touch. macOS won't say that a finger is on the sensor: BiometricKit's presence detection answers error 1 to a process without Apple's entitlement, and the finger is read only for the app in front. So the browser has the front whenever the user's hands have been still for the time a hand takes to reach the sensor, 0.8 s after a key and 0.5 s after the mouse, down from 1.2 s and 0.7 s. A key that ends a pause they didn't mean is lost to their app, so each one doubles the pause that is waited for, up to four seconds, instead of going there at once. The notch says "Sign in to <site>" only while a sheet is open and the browser has the front, and no longer repeats itself.
…ed touch waited for Giving the front back went through a call macOS ignores from a helper in the background, and then, 0.15 s later, through asking the user's app itself. In a live run that second step fired after the browser had the front again for a new pause, and pulled it away. Their app now comes back by the window they were in, at once, and is asked itself only if that fails and the browser hasn't been given the front again. Asking an app itself brings its main window along, which with a sheet open was a window of the user's. So it is used only before the sheet is open, and an arming that would need it afterwards fails instead. A sheet whose buttons can be pressed again didn't take the finger: the notch asks again and the browser gets the front in the next pause, where before it stayed dark until the wait ran out.
…w what Touch ID is doing The cursor pile was drawn anew for every step an agent took, several times a second, and each time it faded in, slid, swept its rim glow and wiggled: with one agent at work the pile was moving in 97% of the pictures taken of it at 12 a second. It is drawn again only when who is in it changes, and a cursor stirs once in a while, with one slow movement instead of three quick turns. The same stream of steps now moves it in 11% of them: as it comes, once while it is there, and as it goes. The ring around the Touch ID icon grew from the icon's bottom-left corner, because a view's own layer scales about that corner. The island's contents came in and went out from that corner too. The ring is a layer placed by its middle, and the contents scale about theirs. The Touch ID banner now shows what its sheet is doing, as the sheet does: dim while the user's hands are busy, a ring while the finger is read, a turning arc with "Signing in…" once the sheet took the touch, then a check with "Done", and it closes in about the time the sheet takes. It changes where it is instead of coming in again for each thing it says. A close left its fade behind, which kept contents that came right after it unseen until the close had ended.
macOS makes an app that has windows the active one as it starts, when the app in front started it. A chat's server starts the notch app while the user is in that chat, so the notch app took their keyboard 0.2 s after it started, in 5 of 6 starts, and kept it until they clicked their window again. It restarts each time it has been idle for five minutes. It now starts as a process without windows, which macOS doesn't activate, and becomes one with windows when it first shows the island: 12 of 12 starts left the user's app in front. If it is made the active app all the same, while no field on the island takes the keyboard and it isn't asking for a finger itself, the app the user was in has the front back at once.
The scan of this branch's history found 23 values in the vault's tests and in the notch app's storyboard: made-up addresses, and passwords and keys that open nothing. None is real. Addresses in the reserved .test domain are allowed now, since nobody can own one. Two addresses were in domains that are not reserved: they move to .test, and their five occurrences in the first commit of this work are acknowledged by their exact places. The made-up passwords and keys are allowed by their exact values, so a real key of the same shape is still found.
…w at once, their own first
On 26 November a click on Safari's Dock icon got the user nothing for 16 s. The only window Safari had was a chat's
page on the agent's desktop, so Safari opened none, and the build that ran had no answer to the click.
The answer written for it waited for the agent's step: it took the workspace's lock, which a `wait` or a page load
holds for up to 45 s. It also opened a copy of the agent's page, or brought the agent's window, when the user had a
window of their own.
- The helper tells the chat's server of the click as {"came": ...}, with whether a window of the browser is before
the user. That is read from the window server, which answers while the browser is busy. The message carries no
"event", so a server from before it says nothing of it to its agent.
- The server answers on a thread that takes no lock, through a call to the page backend that reads and writes
nothing of the workspace. A window of the user's in the Dock or in another Space comes back to them. With none at
all, the chat's window comes to their screen with its page as it is, and its tab gets the chat's mark, by which
the chat finds it among theirs. What the chat keeps of the page changes at its next step.
- A click that brings the user a window of their own is answered by that window alone.
- Coming to the browser another way than by its Dock icon counts as the click does.
- A click on a chat's preview at the notch asks for the chat's page. The notch app tells the chat's helper, which
brings a parked app forward or tells the server. With a window of the user's on screen the page opens in a tab of
that window, and the agent moves into that tab at its next step. Before, the click only activated the app, which
shows nothing while its window is out of sight.
- The guard that gives the keyboard back to the user's window took a window out of the Dock that the user had just
put there. With no window of theirs before them, the app whose window they see gets the keyboard now.
Measured with the user's own clicks on a local page, each during a 40 s step of the agent's, on builds of this
change as it grew. With no window of theirs, the agent's window was on their screen 0.57 s after the press, before
the rule that their own window comes first. With theirs in the Dock, theirs came back in 0.54 s and the agent's
stayed out of sight, with the front going to another app for half a second on the way. A window they put in the
Dock stayed there. What came after those runs had no real click: the hold-off that ends that flicker, the
message's new name, and the two conditions on the keyboard hand-off. A run without the user showed their window on
the same tab before the agent's tab opened, while its page was away, and after it came back.
… the agent's steps too The helper told the chat's server that the user had come to the browser another way than by its Dock icon only while it watches the apps the chat drives: during a step of the agent's and for 10 s after it. A Command-Tab to Safari later than that, with the chat's page still on the agent's desktop, got the user an app in front with no window, which is what this branch set out to end. The server is told before that check now, whenever the user comes to the browser and has no window of it before them. It hears of such a switch more often, so two tests say what it does with one: what it does for a click on the Dock icon while a page is away, and nothing while none is. Found by reading, and the helper's side is not verified by a run. A Command-Tab posted by a program was sent back as an app that came forward by itself in each of three tries, so a test could not play the user's switch, and no unit test covers the helper. With a scratch build of the changed helper the notch pass still works, a Command-Tab posted during a step is still sent back, and one posted between steps tells the server nothing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
ucu-island). A small app that draws ucu's prompts at the MacBook notch: approvals, a login form, toasts, the cursors of the agents at work, and a Touch ID banner. The server talks to it over a Unix socket.vaulttool fills, captures and pastes them, and the model gets ids and masked previews.ask_userasks at the notch.vaultfillon a page that offers a passkey moves the agent's Safari tab to its private desktop, presses the page's passkey button with a real click, and waits there for the user's touch. The notch names the site while the finger can be read, and says "Pause, then touch" while it can't.mainmerged in. Two clashes with the fixes of 25 November are resolved. Both sides had anask_userin the server: the notch tool's method isnotch_asknow, and the tool keeps its name. The notch work sentfrontwithallow, a key the helper already answers as a question, soshowsendsallowalone, as onmain.How the passkey step works
Measured on Safari with a local WebAuthn page and a test passkey:
So the helper makes Safari the active app by the one window on the agent's desktop (
_SLPSSetFrontProcessWithOptionsand the key-window records, the way window managers do it), which leaves the user's windows where they are. It does so only while the user's hands are still, 0.8 s after a key and 0.5 s after the mouse, and gives their app back at any input, when the sheet takes the touch, and on every other way out. A key pressed while Safari has the front goes to the sheet, which ignores it, and is lost to the user's app. Each such key doubles the pause that is waited for, up to 4 s.In Chrome, where none of this is measured, the agent's window comes to the user, who touches there.
Coming to a browser an agent works in
While a chat's page is in a window on the agent's desktop, Safari and Chrome open no window for a click on their Dock icon, because they have one. With no window of the user's on screen the click got them nothing until the agent brought its page, which took 16 s in the case that prompted this.
{"came": "dock"}), of a switch to the browser another way ("switch"), and of a click on the chat's preview at the notch ("notch"), each with whether a window of the browser is before the user. It tells of a switch between the agent's steps too. The message carries noevent, so a server started before this change ignores it.The notch app tells the helpers through a distributed notification,
com.ucu.asked-at-notch. Any process of the same user can post it, and so bring a chat's window or page in front of the user. It carries the chat's process number and an app's name, and releases nothing.This replaces what pull request 37 did for the Dock click: a copy of the page in a tab of the user's window, opened after the agent's step. Its other half, the tab that stays open while the user may be looking at it, is merged unchanged.
Notch fixes
Validation
python3 -m unittest discover -s testsinucu/: 251 tests pass at 5491d50. They use stand-ins for the helper, the engine, the page backend and the notch app, so they cover the server only.vaultfillandask_user, with the user in another app and in a Safari window of their own. With real input while Safari had the front, their app came back each time and the touch was read at the next pause. From the switch to the window-only method on, the user's windows stayed on top in every run. One run had nobody there: it ended after 90 s with the user's app in front.ucu doctorpasses.Not verified live
fillwith a saved login,capture,paste), which only the stand-ins exercise. No real account was used.Known problems, not fixed here
The vault doesn't hold yet against a process that runs as the user, or against the model itself:
vault_resolvereleases a secret with no prompt when the destination is a file, to any process that can open the socket.A separate change for these is in progress. Until it lands, the vault keeps secrets out of the chat by accident, not by force.
The notch's preview of a chat that works in a browser can picture the wrong window. The server sends no window number for a browser step, so the notch app takes the first window of the browser on screen, which is the user's own: seen once, with the chat's page on the agent's desktop.
For the owner to decide
mainwaits 4 s before it brings an app forward, for the same reason: a keystroke that goes to the wrong window. The shorter pause makes a touch register as the hand reaches the sensor, at the price of a lost key now and then.Install notes
ucu updaterebuilds the engine,ucu-windowanducu-island. It doesn't restart a notch app that is running: stop it once withpkill -f "ucu-island serve", and the next ucu call starts the new one.