Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: anomalyco/opencode-android
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dev
Choose a base ref
...
head repository: anomalyco/opencode-android
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: widgets-sessions
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 20 commits
  • 612 files changed
  • 1 contributor

Commits on Nov 27, 2026

  1. feat(system): show OpenCode's push messages as notifications

    OpenCode now sends push messages itself (specs/v2/push.md in the opencode
    repo): permission requests, questions, finished and failed turns, and clears.
    The phone registers with PUT /api/experimental/push/device/<ref> instead of
    pairing through the notify plugin, and shows each message as its own
    notification:
    
    - Permission: the commands or paths in a code block with Deny, Always Allow
      and Allow. A request that was cut only offers Open.
    - Question: up to three option rows that answer on tap, plus Reply for a typed
      answer. Long questions, several questions and multi-selects only offer Open.
    - Finished and failed: the end of the answer or the error, with Reply.
    - Clears remove a notification, ordered by time as the spec asks.
    
    Replaces OpenCodeClient.pairNotificationPreview with registerPushDevice and
    drops the "previews need HTTPS" error. Boxes in the old payload format still
    go through the old path.
    
    Verified: scripts/check.sh on the Android VM (assemble, lint, unit tests),
    translations.py all.
    Tarquinen committed Nov 27, 2026
    Configuration menu
    Copy the full SHA
    29f8738 View commit details
    Browse the repository at this point in the history
  2. chore(app): let the lab launch hook take a server password

    The debug-only lab-server-url extra saved the server with an empty password, so a
    test server with a password answered 401. lab-server-password sets it.
    
    Verified: a debug build launched with both extras connected to a password-protected
    server on the emulator.
    Tarquinen committed Nov 27, 2026
    Configuration menu
    Copy the full SHA
    003c18c View commit details
    Browse the repository at this point in the history
  3. fix(system): push notification fixes from emulator testing

    - A question answered by typing into the notification stayed in the shade:
      Android refuses an app's cancel of a notification that was replied to
      inline. It is now posted again with a short timeout, and later clears leave
      it alone while it goes.
    - The launcher's badge count was the unread count times the number of
      notifications, because each one carried the whole count. Each push
      notification now counts as one.
    - A finished turn shows the end of the answer as plain text (Markdown marks
      dropped), cut to the lines that fit, instead of the first lines of the last
      500 characters.
    - A long question's collapsed line is its last line, which is the one that
      asks.
    - "Wants to run a command" instead of "Wants to run 1 command".
    
    Verified on the Android VM emulator (API 36) against an OpenCode dev server:
    typed answer removes the question and the Finished notification replaces it;
    scripts/check.sh :feature:system; translations.py all.
    Tarquinen committed Nov 27, 2026
    Configuration menu
    Copy the full SHA
    95e1449 View commit details
    Browse the repository at this point in the history
  4. chore(system): log push registration and describe push delivery as it…

    … is now
    
    The parity doc still described the relay work FCM needed; the relay has it,
    and OpenCode sends the pushes itself.
    
    Verified: scripts/check.sh :feature:system on the Android VM.
    Tarquinen committed Nov 27, 2026
    Configuration menu
    Copy the full SHA
    6ecbd5c View commit details
    Browse the repository at this point in the history
  5. test(system): cover the push messages, and ship the Firebase configur…

    …ation
    
    PushNotificationTests reads messages in the server's format and checks what
    each becomes: the permission's commands and buttons, question rows, the end of
    a finished answer, failure text, unknown messages, and the ledger's ordering
    of messages and clears.
    
    firebase.xml holds the Firebase app's four string resources, which FCM needs
    to give the app a token. Without it no push can arrive.
    
    Verified: scripts/check.sh :feature:system on the Android VM (14 new tests pass).
    Tarquinen committed Nov 27, 2026
    Configuration menu
    Copy the full SHA
    590bdf6 View commit details
    Browse the repository at this point in the history
  6. fix(system): handle push messages cut down to their ids, and review f…

    …ixes
    
    A permission request the server cut down to its ids has no action. It was
    shown as a generic notification; it is now a permission notification that
    only offers Open. A clear with a version this app doesn't know does nothing.
    Typed replies ask for the phone to be unlocked, as Allow does.
    
    Also drops an unused parameter, updates two comments and the parity rows
    that still described the notify plugin's pairing call.
    
    Verified: scripts/check.sh :server :feature:system on the VM (PushNotificationTests 14 passed).
    Tarquinen committed Nov 27, 2026
    Configuration menu
    Copy the full SHA
    e04e326 View commit details
    Browse the repository at this point in the history
  7. fix(system): give every push notification the same icon colour

    The icon was orange, green or red by kind. It now has the system's own
    colour, as the app's other notifications do.
    
    Verified: scripts/check.sh :feature:system on the VM.
    Tarquinen committed Nov 27, 2026
    Configuration menu
    Copy the full SHA
    d2c473e View commit details
    Browse the repository at this point in the history
  8. fix(system): only offer Open for a permission request too long to show

    A long command, or many of them, was cut at four lines while Allow and
    Always Allow stayed, so the part being approved could be hidden. The code
    block now shows up to eight lines, and a request that doesn't fit in them
    only offers Open, like one the server had to cut. Whether it fits is
    estimated from the screen width and font size, erring towards Open.
    
    Shell commands start with "$ " so a wrapped command reads as one.
    
    Verified: scripts/check.sh :feature:system on the VM (PushNotificationTests
    15 passed); on an API 36 emulator a 300-character pipeline, eight chained
    commands and a heredoc script each showed Open only, and two short commands
    kept Deny, Always Allow and Allow.
    Tarquinen committed Nov 27, 2026
    Configuration menu
    Copy the full SHA
    bef150b View commit details
    Browse the repository at this point in the history
  9. fix(system): drop the "Always Allow covers" line from permission noti…

    …fications
    
    The line listed every saved pattern under the commands and ran to two
    clipped lines for a request with several commands. A permission
    notification is now the commands and the buttons; the patterns Always
    Allow would save are no longer read from the message.
    
    Verified: scripts/check.sh :feature:system on the VM (PushNotificationTests
    15 passed); a two-command request on an API 36 emulator shows the commands
    and Deny, Always Allow, Allow with nothing between.
    Tarquinen committed Nov 27, 2026
    Configuration menu
    Copy the full SHA
    f835e9f View commit details
    Browse the repository at this point in the history
  10. fix(system): keep Android's suggested actions off push notifications

    A permission for a file such as README.md got a system "Open link" chip,
    because the name looks like a web address.
    
    Verified: scripts/check.sh :feature:system on the VM; an edit request for
    README.md on an API 36 emulator shows only Deny, Always Allow and Allow.
    Tarquinen committed Nov 27, 2026
    Configuration menu
    Copy the full SHA
    cb32999 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2026

  1. Merge dev: In-App Notices are gone (#300)

    Push notifications no longer post silently for an In-App Notices mode:
    PushNotifications drops the silent flag, since presentation() is now only
    None (the visible session) or Banner. docs/parity/system.md keeps this
    branch's push rows and takes dev's wording that In-App Notices is not in
    the app.
    
    Verified: scripts/check.sh (all modules) on the Android VM.
    Tarquinen committed Nov 28, 2026
    Configuration menu
    Copy the full SHA
    627dc06 View commit details
    Browse the repository at this point in the history
  2. feat(system): replace the notify plugin with the server's push system

    The app still carried the old notification system next to the new one: the
    notify plugin check and its setup prompt, the callback address sent with
    every prompt and share, Always Notify, and the old payload format.
    
    Now there is one path. The phone registers with the server's push API when
    it connects, and Settings > Notifications controls only this phone:
    
    - Notifications: on or off for this server. Off deletes the device on the
      server, and so does removing the server from the app.
    - Notify About: Everything, or Only When It Needs Me.
    - Sound and banners: rows that open Android's settings for each channel.
    - A server without the push API shows the switch disabled.
    
    Removed: OpenCodeClient.notifyPluginStatus and setAlwaysNotify,
    PromptContext.notificationCallbackURL, the callback in ShareCredentials,
    the Always Notify card, the old payload path in SessionPushNotifications,
    NotificationContent and NotificationCrypto, and the What's New entries for
    Always Notify, notify plugin setup and encrypted notification previews.
    A server older than 2.4.2 no longer notifies this app.
    
    Verified: scripts/check.sh (all modules) on the VM. On an API 36 emulator
    against a server run from OpenCode dev: registration on connect, each
    level, off and on, Android's permission never asked and denied, a real
    push through the relay and FCM, removing a server (its device is deleted),
    and a 2.4.1 server (switch disabled).
    Tarquinen committed Nov 28, 2026
    Configuration menu
    Copy the full SHA
    caadbd8 View commit details
    Browse the repository at this point in the history
  3. fix(settings): drop the footer under Sound and banners

    The line under the three rows ("Opens Android settings, where each kind can
    pop up, make a sound or be turned off.") read oddly and the rows explain
    themselves, so it is removed along with its string and translations.
    
    Verified: scripts/check.sh :feature:settings on the VM, and the page on an
    API 36 emulator in light and dark.
    Tarquinen committed Nov 28, 2026
    Configuration menu
    Copy the full SHA
    6a12a44 View commit details
    Browse the repository at this point in the history
  4. fix(settings): remove the Sound and banners rows

    The page listed Needs You, Finished and Failed with a way into each
    channel's Android settings. The app decides how each kind arrives instead
    (permissions, questions and failures pop up with a sound; a finished
    session only makes a sound), so the rows, the code that read the channels'
    importance and their strings are removed.
    
    Verified: scripts/check.sh (all modules) on the VM, and the page on an API
    36 emulator in light and dark.
    Tarquinen committed Nov 28, 2026
    Configuration menu
    Copy the full SHA
    67e9a69 View commit details
    Browse the repository at this point in the history
  5. feat(drawer): ask to notify after the first send

    Android's notification prompt only appeared from the switch in Settings or
    a first voice call, so most people would never be asked and never get a
    notification.
    
    Now an accepted send shows the prompt while Android has never asked. That
    happens once per install: a refusal is remembered and the Settings page
    then points at Android's settings. Allowing registers the phone.
    
    Verified: scripts/check.sh (all modules) on the VM. On an API 36 emulator
    with a fresh install: the first send shows the prompt, Allow registers the
    device on the server, and after Don't allow a second send does not ask.
    Tarquinen committed Nov 28, 2026
    Configuration menu
    Copy the full SHA
    f982510 View commit details
    Browse the repository at this point in the history
  6. fix(notifications): clear stale notifications, and open a tap over Se…

    …ttings
    
    - Opening the app removes this server's notifications for sessions that are
      read or archived and for requests already answered. The server's clear push
      normally does this, but it can be lost.
    - Tapping a notification closes Settings and the drawer so the session shows.
    - Removing a server from the app removes its notifications; a tap on one did
      nothing before.
    - Notifications no longer carry CATEGORY_MESSAGE, which is for messages between
      people and can pass Do Not Disturb.
    
    Verified with scripts/check.sh and on an API 36 emulator: stale notifications
    removed on reopening after lost clears (unread ones kept), a tap with Settings
    open, removing a server with a notification showing, and no category in
    dumpsys notification.
    Tarquinen committed Nov 28, 2026
    Configuration menu
    Copy the full SHA
    c682ef1 View commit details
    Browse the repository at this point in the history
  7. refactor(notifications): remove the icon badge chain and dead push code

    Cleanup after review of the push rebuild.
    
    - The app no longer keeps its own launcher count. AppIconBadge, AppBadgeLedger,
      Home's badge publishing, the ledger block in the push handler and the
      "Badge on the App Icon" What's New entry are gone: every push already counted
      as one, so the saved count was computed and never shown. The launcher badge
      is the notifications that are showing.
    - Removed members nothing called: SessionNotifications.onOpen,
      pendingDestination, includeBadges, PushTokenProvider.inert; the
      NotificationPresentation enum is now isOnScreen(sessionID).
    - A device id is no longer made up on read: the stale sweep, turning
      notifications off and removing a server use savedRef, and no DELETE is sent
      to a server this phone never registered with.
    - A notification choice is saved only after the server accepts it, instead of
      saved first and rolled back.
    - The three push requests are OpenCodeClient values with live and test
      implementations, like every other request.
    - Every removal goes through PushNotifications.cancel, so a notification that
      was answered inline is removed the same way everywhere.
    - HomeNotificationsFeature loads the settings in one helper.
    - Stale comments, a test name and the parity rows updated.
    
    Verified: vm.sh check (build, lint, unit tests) passes. On the emulator against
    the push rig: Finished and question pushes arrive and group; answering a
    question from the notification removes it; opening a session clears its
    notification; the Notifications switch deletes and re-registers the device;
    offline the switch stays on with "Couldn't change notifications. Try again.";
    with the device deleted on the server, reopening the app removes a viewed
    session's notification and keeps an unread one.
    Tarquinen committed Nov 28, 2026
    Configuration menu
    Copy the full SHA
    bd393ed View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2026

  1. feat(system): add the base for the redesigned home screen widgets

    The new Ask, Needs You and Sessions widgets (issue #287) all draw from one
    saved file, so they never touch the network while drawing. This adds that
    file and what writes it, with no widget yet:
    
    - HomeWidgetData / HomeWidgetStore: per server, the session list with each
      session's status and times, and the permissions and questions waiting for
      an answer.
    - Writers: the app's session list while the app is open (throttled, and once
      more on entering the background), a push (permission, question, finished,
      failed), and a clear or an answer from a notification.
    - HomeWidgetKit: the shared Glance pieces (card, header, project badge,
      button, code box, not-paired state) in the desktop look.
    - The Home Screen Widgets experiment, off by default. Widget receivers in
      widgets.home are declared disabled and enabled while it is on, so the new
      widgets stay out of the launcher's picker until then.
    - A debug-only lab activity that draws a widget at exact sizes from fixture
      data, for screenshots.
    
    Verified: scripts/check.sh :core :feature:system :feature:drawer :app on the
    dev VM (build, lint, unit tests, translations); the lab on the emulator in
    light and dark with a throwaway widget, including a scrolling list.
    Tarquinen committed Nov 29, 2026
    Configuration menu
    Copy the full SHA
    e3559a2 View commit details
    Browse the repository at this point in the history
  2. feat(system): add the Sessions home screen widget

    The Sessions widget lists the current server's sessions from the saved widget data,
    needs you first, then working, then newest, and each row opens its session. It sizes
    from a 2x2 (the top session with counts around it) through a 4x2 (header and as many
    rows as fit, then "+N more") to 4x3 and taller (a scrolling list). The header has a
    summary, a refresh and a New Session control, dropped before text when narrow.
    
    Nothing pushes when a session starts working, so this widget can read the list itself:
    from the header's refresh, and about every 30 minutes on a network while one is placed
    (scheduled in onEnabled, cancelled in onDisabled). It skips while the app is in the
    foreground. A refresh keeps saved badge colours (a new session takes those of a saved
    session in the same project, otherwise the default; the palette stays in :feature:drawer)
    and keeps a saved Unread or Failed status for a session that is still idle. A failed
    read records refreshFailedAt and the header shows "Offline · <time>". A working row
    older than two minutes reads "Last seen working", and a one-time job redraws the widget
    when that happens.
    
    Verified: scripts/check.sh :feature:system on the VM; the lab at 130x130 to 400x480,
    light and dark, font 1.3, with the busy, stale, empty, caught-up, unpaired, offline and
    single fixtures; and on the emulator's home screen against session-lab: placed the
    widget, changed the lab's checkpoint, force-stopped the app and tapped refresh (Needs
    your input -> Working), saw it turn "Last seen working" about 3 minutes later, then
    stopped the lab and tapped refresh (Offline · 1:06 AM). Resized on the launcher.
    Tarquinen committed Nov 29, 2026
    Configuration menu
    Copy the full SHA
    0aceff5 View commit details
    Browse the repository at this point in the history
  3. fix(system): stop the Sessions refresh when no widget is placed

    Turning the Home Screen Widgets experiment off disables the receiver
    without onDisabled, so the periodic refresh kept waking the app every
    30 minutes. The worker now cancels its work when no Sessions widget is
    placed.
    
    Verified on the emulator: placed a widget, periodic job enqueued; turned
    the experiment off (getGlanceIds returned [] while the receiver was
    disabled), ran the worker, and the periodic job was cancelled. With the
    experiment on, the placed widget's refresh still ran the worker and
    showed the row as Working. vm.sh check :feature:system passes.
    Tarquinen committed Nov 29, 2026
    Configuration menu
    Copy the full SHA
    026e9a0 View commit details
    Browse the repository at this point in the history
Loading