Skip to content

feat(pm-stack): Android widget, dictation tile, share target, notification permission; phones linked to read a summary - #12501

Merged
dezren39 merged 7 commits into
mainfrom
claude/pm-android-native
Nov 22, 2026
Merged

dezren39 merged 7 commits into
mainfrom
claude/pm-android-native

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

What

The Android app stops being only a window onto the site, and gets a real defect fixed.

Found by reading the built app's manifest against the reference project

  • The activity that asks for permission to show notifications (Android 13 and later) was never declared, so notifications could not be turned on inside the app. It is declared now, and notifications carry the app's own status-bar mark.

New in the app

  • A home-screen widget: in progress, queued next, needs me, and the task being worked on with its next step. Each number opens its screen; the microphone starts dictation.
  • Dictation from a long-press shortcut or a quick-settings tile, with the app closed. The tile shows how many things need the owner.
  • Text shared from any app, or selected anywhere ("Ask the fleet"), lands in the Ask box.
  • Long-press shortcuts (Dictate, Ask, Needs me, Now) move the open app to that screen instead of reloading it.

New in the console

  • A linked phone reads a short summary with a token of its own (/console/device/summary): three counts and the top line of each list, nothing else, and it cannot change anything. Linking passes no secret through an address: the phone shows the signed-in owner a hash, the owner approves it under More, Phones, and the phone then presents the value behind the hash and is given its token once. The store keeps hashes of tokens.
  • More, Phones: approve a link, see linked phones and when they last read, remove one.
  • Fixes: "just now ago"; a device labelled "KHTML, like Gecko"; prompt replies lost at a comment page boundary (review finding on fix(pm-stack): prompts appear at once, board-sync links are not replies, and five review findings #12454).

Evidence

Check Result
cd pm-stack/console && bun test 74 pass
python3 -m unittest discover -s pm-stack/console/scripts 7 pass
Mutation check of the linking and summary code 22 planted faults, 22 caught (reuse of an approval, expiry, any-verifier, token kept on disk, open paths, limits, zeros before first read, and others)
Android build of this branch (pm-console-android run 44995966577) success; the merged manifest of the built APK was read back and has the permission activity, the widget receiver, the link and share activities and the status-bar mark
Link flow driven in Chrome against the demo server 404 before approval, approve in the page, token issued once, summary read, phone listed, removed, summary refused

Not verified: the native parts running on a device. They compile and are declared; the site's half of each is tested.

After merge

expose.py (already on a 15-minute timer on the host) lets /console/device past the edge's sign-in; every other path under /console still needs the sign-in at the origin, which the tests pin.

Undo

Revert this PR. Linked phones stop reading; nothing else depends on it.


Generated by Claude Code


Show it working
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

The app was a window onto the site and nothing else. Around the same
screens it now:

- receives text shared from any app, and text selected anywhere
  ("Ask the fleet" in the selection menu): it lands in the Ask box;
- starts dictation with the phone's own speech recogniser from a
  shortcut or a quick-settings tile, with the app closed, and puts the
  words in the Ask box;
- offers Dictate, Ask, Needs me and Now on a long press of its icon;
- shows the site's notifications as its own (already wired; unchanged).

Handed-over words travel after the "#" of the address, which a browser
never sends to a server, so they stay on the phone until Send.

minSdk 24 (quick-settings tiles). Version 0.2.0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
…its own

The Android app's home-screen widget cannot use the sign-in the browser
holds. It gets a token that reads one thing: the counts (in progress,
queued, needs the owner) and the top line of each list. Nothing can be
changed with it.

Linking passes no secret through an address or another app. The phone
makes a random verifier and shows the signed-in owner only its hash;
the owner approves the hash (action device.approve); the phone presents
the verifier at POST /console/device/link and is given its token once.
The store keeps hashes of tokens, never tokens. The owner sees linked
phones by name (GET /console/api/devices) and can remove one.

/console/device/link and /console/device/summary are answered without
the sign-in and checked here instead; tries on both are limited, and
wrong tokens never slow a linked phone. expose.py lets /console/device
past the edge's sign-in, as it does the icons; every other path under
/console still needs the sign-in at this origin.

A widget's read brings stale sections up to date and waits for them
(Docs.current), without counting as someone looking, so it does not
keep the background loop running.

Tests: 12 new (69 bun tests in all), 7 python tests.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
…shortcuts that keep the open app

Found by reading the built app's manifest against the reference
project: the activity that asks for permission to show notifications
(Android 13 and later) was never declared, so notifications could not
be turned on inside the app. It is declared now, and notifications
carry the app's own status-bar mark.

New
- A home-screen widget: in progress, queued next, needs me, and the
  task being worked on now with its next step. Each number opens its
  screen; the microphone starts dictation; it reads again every half
  hour, when the app is opened, and on a tap. It reads the summary
  itself with a token that can read only that (see the previous
  commit), linked by approving this phone once inside the app.
- The quick-settings tile shows how many things need the owner.

Fixed
- Long-press shortcuts, share and dictation run in a task of their own
  and bring the open app forward at the right screen. Before, a
  shortcut threw the open app away and loaded it again, and dictation
  could take the app out of the recent-apps list.
- The app keeps its place when it has been in the background a while.

Version 0.3.0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
…sed times read right

- More, Phones: approve the Android app's request to link this phone
  (it shows what the widget can read, and that it can change nothing),
  list linked phones with when they last read, remove one, and what the
  Android app adds. Approving hands back to the app with an address
  that carries nothing (pmconsole://finish).
- The summary answers "not ready yet" until the queue has been read
  once, instead of zeros; a side list that cannot be read does not stop
  the rest. The two open paths exist only when their limits are set.
- "just now ago" is gone: elapsed time is one phrase everywhere.
- A device was labelled "KHTML, like Gecko" (the last bracket of the
  browser's name, not the first); notifications use the fixed label.
- README: the app's five tabs, where its state comes from,
  notifications and phones; the Android README lists the native parts.

Tests: 74 bun tests (new: the page's own functions, not-ready and
partial summaries, no open paths without limits); the link flow was
also driven in Chrome against the demo server, start to finish.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
…he Phones screen follows the link through

- A prompt thread whose last page held only a bot's link (or fewer than
  six replies) lost its answer and fell back to "waiting". Replies are
  now read from the last page backwards, up to three pages, until six
  are in hand. Found by review on #12454.
- Phones: the approval card says to approve only after tapping the
  widget on this phone; once the phone has collected its token the
  card goes away and the phone appears in the list when the app is
  shown again.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
@dezren39
dezren39 requested a review from a team as a code owner November 22, 2026 10:39
@dezren39
dezren39 merged commit c71d262 into main Nov 22, 2026
1 check passed
@dezren39
dezren39 deleted the claude/pm-android-native branch November 22, 2026 10:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T10:40:46.729648Z 01f2926 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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.

2 participants