Skip to content

Long press a Remotes row for the web's menu: pin, stash, mute, block, leave - #116

Merged
simonhamp merged 2 commits into
mainfrom
feat/remotes-inbox
Oct 28, 2026
Merged

simonhamp merged 2 commits into
mainfrom
feat/remotes-inbox

Conversation

@simonhamp

@simonhamp simonhamp commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Long press a row in the Remotes inbox to get the web's row menu, in its order, words and Lucide icons:

  • a conversation with a person: View profile, Pin or Unpin, Stash or Pop, Mute or Unmute, then Block @handle in red
  • an org: Pin or Unpin, Stash or Pop, Mute or Unmute, then Leave org in red

A tap still opens the thread. This covers items 5 (pin whole chats), 6 (the row menu) and 10 (muting).

Pinning uses PUT .../pin. Pinned rows go to the top as devnull sorts them (pinned first, then latest message) and show the web's small pin above the time.

Muting uses PUT .../mute. Mute opens a sheet with the web's dialog wording and its four durations (one hour, until tomorrow, one week, forever). Unmute goes straight away. A muted row shows a crossed-out bell next to where the pin goes.

Block and Leave org ask first with the web's dialog text, then the row goes. Block is POST users/{handle}/block, leave is DELETE remotes/orgs/{org}/members/{me}. The full org settings screen is in the org-members PR, not here.

Every change shows on the row at once and goes to devnull in the background through WritesInBackground, as Stash already did in the thread. The kept inbox is patched too, so going back or reopening the app shows it. A 15-second poll that lands before devnull answers doesn't undo it. If devnull says no, the row goes back and a toast says so in the web's words ("Could not update the pin. Try again." and so on). Mute and Stash also get the web's success toasts.

The thread's own ... menu gets Pin and Mute too, since the web's thread header has them. I kept that edit small because the message-pins PR is changing Conversation.php at the same time. It doesn't add Block or Leave to the thread menu.

Lucide::Pin now draws the web's pin instead of the SF/Material one, so Pin to profile in a commit's menu and the pinned marker on a profile change slightly too.

Depends on

Both are merged, and the second commit here bumps the nativephp/mobile and nativephp/mobile-ui locks to them.

Worth a look

  • The web doesn't mark muted rows at all. I added the crossed-out bell because otherwise you can't tell a row is muted without opening its menu. Easy to drop.
  • Durations come from a sheet because Android alerts take three buttons at most and pressable menus have no submenus.

Testing

tests/Feature/Screens/RemotesMenuTest.php covers the menu for each row type, pin and unpin with the re-sort and the kept inbox, a poll landing before the pin's answer, mute with the sheet, unmute, stash, block and leave with their confirmations, each failure putting the row back with its toast, and Pin and Mute in the thread menu. Three existing tests now expect the Lucide pin.

I tried it on an iOS 26.2 simulator and an Android 15 emulator against a local dev-null.sh at production, with the two framework branches through path repos. On both, a long press opens the menu, its items reach devnull, and a tap still opens the thread.

Screenshots

long-press

Recordings: Android dark, after, Android light, after, iOS dark, after, iOS light, after

menu

iOS light iOS dark Android light Android dark
After

mute-sheet

iOS light iOS dark Android light Android dark
After

remotes

iOS light iOS dark Android light Android dark
Before
After
  • No visible change

🤖 Generated with Claude Code

… leave

A long press on a row in the Remotes inbox opens the web's row menu, in its
order, words and Lucide icons: View profile, Pin or Unpin, Stash or Pop, Mute
or Unmute, then Block @handle, or Leave org on an org. A tap still opens the
thread. The menu uses the new :context-menu on pressable from mobile-air, drawn
by mobile-ui.

Pinned rows sort to the top as devnull sorts them and wear the web's pin.
Mute asks how long for in a sheet with the web's dialog wording, and a muted
row wears a crossed-out bell. Block and Leave org ask first, as the web does.

Every change shows at once and goes to devnull from the background. The kept
inbox is patched too, and a poll that lands before devnull answers keeps the
change. If devnull says no, the row goes back and a toast says so in the
web's words.

The thread's own menu also gets Pin and Mute, as the web's thread header has
them.

Lucide::Pin now draws the web's pin, so Pin to profile in a commit's menu and
the pinned marker on a profile change from the system glyph to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NativePHP/mobile-air#621 and NativePHP/mobile-ui#179 are merged, so the
Remotes row menu now has the attribute and its renderers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonhamp
simonhamp merged commit e4a31ce into main Oct 28, 2026
3 checks passed
@simonhamp
simonhamp deleted the feat/remotes-inbox branch October 28, 2026 12:37
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.

1 participant