Skip to content

Put a commit's save, link, report and delete in one More menu - #7

Merged
simonhamp merged 1 commit into
mainfrom
feat/more-menu
Oct 18, 2026
Merged

simonhamp merged 1 commit into
mainfrom
feat/more-menu

Conversation

@simonhamp

Copy link
Copy Markdown
Member

Every commit now has one ⋯ button on the right of its action row, in place of the bookmark, the copy link button and the old More button with its bottom sheet. It keeps the 44x36pt target. Tapping it opens the platform's own menu: a UIMenu on iOS and a dropdown on Android. Quote and the left side of the row are unchanged.

The menu holds:

  • Save commit or Unsave commit. This is the existing bookmark call, optimistic with rollback.
  • Share link, which opens the share sheet. The share sheet has Copy. A separate Copy link item would need a clipboard plugin (nativephp/mobile-clipboard), which the app doesn't have, so I left it out rather than add a dependency.
  • After a divider, Report commit on someone else's published commit. It opens the existing report form straight away, so the sheet loses its Share link and Report commit rows.
  • After a divider, Delete commit on your own commits, in red, with the alert the commit page's trash already used.

No mobile-ui or core change was needed. Core's <native:pressable :menu="[...]"> already takes NavActions, and mobile-ui draws them on both platforms: NativeUIPressableRenderer wraps the content in a SwiftUI Menu, and Android's PressableRenderer anchors an ExpressiveMenu dropdown. An icon-only pressable works fine as the anchor. The items are built in App\Devnull\CommitMenu, each with a ref so tests can tap them.

Delete moved from CommitDetail into ShowsCommits, so the Log, profiles and commit pages share it. The alert remembers which commit it's asking about, and only the screen that put it up acts on the answer. After a delete the screen does what it already does when you come back from deleting a commit on its page: it shows what the response cache kept (the cache drops the commit from every list) and asks devnull again. Deleting the commit a page is about still goes back.

What to look at

  • A saved commit no longer shows a filled bookmark in its row. You only see it in the menu, as Unsave commit with a filled icon.
  • The commit page keeps its trash button in the nav bar, so your own commit there has Delete in two places. I left it because removing it wasn't asked for.
  • Each row gains one node (the menu items replace two buttons). A 20 commit Log goes from 1,136 to 1,156 nodes and about 2% more payload. The Log on the simulator published 2,931 nodes and 472 KB, so this eats a little of the headroom under EDGE's 512 KiB frame limit.
  • Twice on the simulator a menu stayed on screen but ignored taps on its items, until a tap outside closed it. Reopening it worked every time. Both times the screen had just changed shape (a reply thread opening, a save landing), so my guess is that a frame replaced the view the menu hangs off while it was up. I couldn't make it happen on purpose, and the Mac was at a load average of 300 to 900 at the time, so treat it as a lead rather than a finding.

Verification

php artisan test: 632 passed. Pint is clean. CommitMenuTest is new and covers what each kind of commit's menu holds (iOS and Android icons), deleting from the Log, a profile and a reply on a commit page, cancelling, devnull saying no, and an alert another screen put up. CommitSheetTest, LogTest, CommitDetailTest, CommitCardTest and LogCacheTest now tap the menu items.

On an iPhone 17 Pro simulator (iOS 26.2) against the timeline API, signed in as local_dev:

  • From the Log: Save then Unsave on someone else's commit (checked the bookmark row in the database both ways), Share link opened the share sheet with the commit's URL, Report commit opened the report form, and Delete on a throwaway commit of mine showed the alert, then the rm … → /dev/null toast, and the row left the Log.
  • From a commit page: the focused commit's menu, Save and Unsave on it, and Delete on a throwaway reply, which stayed on the page and showed "No replies yet."
  • Android wasn't run.
Someone else's commit After Save Your own commit Delete asks first
Share link Report commit A reply on a commit page Reply deleted, still on the page

The screenshots live on the more-menu-screenshots branch. Delete it once this is merged.

🤖 Generated with Claude Code

The right of a commit's action row had a bookmark, then copy link or a More
button that opened a sheet with Share link and Report commit. Now every commit
has one More button with the same 44x36pt target. It opens the platform's own
menu: a UIMenu on iOS, a dropdown on Android. Core's pressable already takes a
:menu of NavActions and mobile-ui draws it on both platforms.

The menu has Save commit or Unsave commit, Share link, and after a divider
Report commit on someone else's published commit or Delete commit on your own.
Report opens the report form straight away, so the sheet loses its Share and
Report rows. Delete asks with the alert the commit page's trash already used.
That flow moved into ShowsCommits so the Log, profiles and commit pages can all
use it. A screen lets a deleted commit go the way it does when you come back
from deleting one on its page. Deleting the commit a page is about still goes
back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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