mirror of
https://github.com/nightly-labs/openbot.git
synced 2026-12-04 02:16:22 +08:00
main
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f164eceee1 |
Send the iPhone notification when the phone has no Live Activity (#18174)
* Send the iPhone notification when the phone has no Live Activity The host keeps the Live Activity registration of a phone in memory. While the host thinks that the Live Activity shows a reply, it sends the reply to the Live Activity and skips the normal notification. When the phone told the host that it has no Live Activity (liveActivityStartedAt null in the push registration), the host used its own start time instead. So after the Live Activity ended on the phone, or Live Activities were turned off, each reply went to a Live Activity that was gone for up to 8 hours. No banner showed and no sound played until the host restarted. The phone sends liveActivityStartedAt in each push registration since the field came with iPhone notifications (#1971), and it sends null only when it has no Live Activity token for that server. The host now lets the Live Activity replace a notification only when the phone gives its start time. If the phone sends null while a Live Activity shows, the user gets a normal notification too, not no alert. The E2E scripts that call showsEvent now pass the start time that a real phone sends. Fixes #17607 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add the iPhone release notes for the Live Activity notification fix Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
92ad076ae9 |
Keep the chosen avatar color in the notch and Live Activities (#14980)
* Keep the chosen avatar color in the notch and Live Activities The runtime snapshot has no avatar color, and the Dynamic Island coordinator replaced the full agent data with it. A neutral color such as Grey has no hue, so the notch went back to the automatic color. The coordinator now keeps the color that it knows for each agent. Live Activities drew the avatar from the seed and the hue only. The phone now draws it with the color, and registers the colored picture through the existing photos field, so a host pushes it while the phone is locked. The tint takes the agent color on the phone and, from the local agent store, on the host. File names without a color do not change, and no wire field is added. Fixes #14964 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Register the colored lock-screen face only when it is ready The phone now keeps a ready colored face in the same state as an uploaded picture. A change of that state registers the phone again. Thus the registration does not skip a face that is still drawing, and a color change registers again while the app runs. The phone also keeps drawing the faces without a color, so the host fallback file always exists. The tint and the face use the color of the shown agent when the agent list does not have it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
03c2ff34c2 |
Remove code comments and add the no-comments rule (#12604)
* Remove code comments and add the no-comments rule Remove the comments from first-party code and configuration files: TS/JS, JSX, CSS, SQL migrations, Swift, Kotlin, Gradle, shell, Docker, systemd, Nix, YAML, TOML, JSONC and GritQL. Keep only what a tool reads: license headers, shebangs, compiler and lint directives, JSDoc types in plain .js files, generated file headers, GritQL scope lines, the install-server.sh help text and the openbot-boat-pre-stop marker. Vendored code, fixtures and released schemas keep their comments. Add the rule to AGENTS.md, and change the docs that asked for comments. Add two i18n keys that only comments named to RELEASED_SOURCE_KEYS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep comments that are data in strings The benchmark task files in opencode-free-models-bench.ts tell the model what each function must do. The sample file and HTML page in the two stories are display content. Put their comments back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep released migrations and mobile native inputs unchanged check:migrations compares each released migration with v0.73.0 byte for byte, so restore src/backend/migrations. A change to a native build input of apps/mobile makes a new runtime version, so restore those files and the extra fingerprint sources. List these files and the comment markers that a tool reads in AGENTS.md. Remove the last requests for comments in src/renderer/AGENTS.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
5592b2633d |
Make notifications reliable, manage them in one place, and show short previews (#4077)
* Make notifications and Live Activities reach the phone, and add notifications for each agent Notifications and Live Activities: - The host keeps an event that comes while the phone only looks on screen, and sends it when the phone turns out to be away and the member did not see it. - A Live Activity takes the place of a notification only when its view shows that event, and only while its updates go out. Its timestamps always increase. - The host sends a notification again after 10 s and 60 s when the relay does not take it. - Only the last closed connection of a session marks the phone as away. - The relay keeps the end of a Live Activity for 1 hour for a phone without network. - The phone replaces an ended Live Activity when the app opens, and one that is almost 8 hours old. - The phone keeps its notification keys when the server list does not load, and reads the push token again after a failure. - An iPhone reads its APNs environment from the profile that signed the app. - A desktop notification of a remote server uses the last agent list when the request fails. Notifications for each agent: - New optional capability agent-notification-levels-v1. Each member reads and sets their own level of each agent. The host keeps it, applies it to phone notifications, and deletes it for a removed member. - Desktop, web client and mobile show a "Notify me" choice in the agent settings, and apply it. Tests: push-notification-away E2E, new checks in the Team API routes and desktop notification E2E. * Make Settings › Notifications the one place for notifications, synced on all devices - The host keeps each member's level of the whole server next to their agent levels (agent-notification-levels-v1, not released yet), applies both to phone notifications, and sends agent-notification-levels-changed to that member's connections after each change. - Desktop, web client and mobile show one matrix of servers and agents (All activity, Only when it needs me, Nothing) and a mute for each server on this device. A change on one device shows at once on the others. - The desktop server list, menus and island use the effective server level: the synced level, else the level of this device. The phone registration and the Live Activity use it too. - The server menu and the agent settings show the level and open the matrix. Server settings have no notification section any more. Agent rows show only the agent title, and the columns keep their width. Tests: new Team API route checks (server level, live change to the member only), a desktop notification E2E step for the synced server level, and the NotificationMatrix story. * Manage notifications only in the Notifications view - Remove the agent Notifications switch from the agent settings on desktop, web client and mobile. The host still honors the shared switch. For an agent that is off for everyone, the matrix shows a "Turn on" button in place of the levels. - On mobile, "Notify me about" opens the matrix inside the agent sheet, not in a new sheet. - On mobile, the level selections and the server chips have a 12 pt corner radius. * Show the lead of a message in notifications and fit the Live Activity to the watch - Notifications on the computer, in the web client and on the phone show the first sentences of the agent message. They leave out code blocks, tables, headings and mail headers, show tool names as words and hidden secrets as "•••" (#3930). - The Live Activity shows the same lead, and the host and the phone hide secrets in it. It offers Approve only for a command that it shows in full. - The Apple Watch Smart Stack gets its own Live Activity layout with margins, and a white state line for several agents. Tests: new notification summary E2E through the real push and Live Activity services; the Live Activity fence E2E now expects the prose after a code block. * Remove two exports that only their own files use * Send to each phone in its own fiber, and read cached levels for desktop notifications - A failed phone send waits 10 s and then 60 s before it goes again. The other phones no longer wait for it. - A desktop notification of a joined server uses the levels that the manager keeps current. It reads them from the host only when this computer could not read them yet. * Add Team API protocol 9 for capability lists of up to 256 Protocols 7 and 8 read at most 128 capabilities, and main filled that list. With agent-notification-levels-v1 it had 129, so peers on protocol 8 refused the list. - Protocol 9 is the protocol 8 wire with up to 256 capabilities. On WebRTC the marker long-capability-lists-v1 says that a peer reads them. It is in the bootstrap list, so the first compatibility read of a protocol 9 host is complete. - A host leaves the protocol 9 capabilities out of the list of a peer below 9, so protocol 7 and 8 peers get the same list as before. A client sends them only to a protocol 9 host. - agent-notification-levels-v1 is a protocol 9 capability. - Desktop, web client and mobile read compatibility with the 256 limit. E2E: team-api-routes (lists for protocols 7, 8 and 9, newer protocol is 10), team-legacy-clients (protocol 9 and 8 peers over WebRTC). Scripts that announce protocol 7 or 8 now send that protocol's list. * Keep notification level changes that a member makes at the same time The store read the levels before it got the write permit, so two changes that overlapped started from the same levels, and the second save removed the first change. The change now reads the levels inside the permit. E2E: team-api-routes sends two agent levels and a server level at the same time and reads all three back. The step fails on the earlier store. * Do not repeat events that the app could show when the phone goes away The host keeps the events that arrive while the phone app is on screen. When the app said that it goes away, the host sent each kept event it could not judge, such as replies in other threads, so a user who read a channel got them again. Over an open connection the app was on screen, so it now gets only what it surely did not see: an unread reply in the agent's own chat, a turn that still shows as failed, and a request that still waits. After a lost connection, when iOS can have suspended the app first, the host still sends the events it cannot judge. E2E: push-notification-away sends a reply in another thread in both cases. The away step fails on the earlier code. |
||
|
|
b676cba2fe |
Keep emoji whole when a Live Activity cuts a code span (#2576)
truncateMarkdown counted and sliced code span content in UTF-16 units. A long code span with emoji was cut too early, and an odd cut left half of a surrogate pair in the detail. Count and slice by code point, as visibleLength does. Co-authored-by: Chao Chen <209239467+surlymochan@users.noreply.github.com> |