Skip to content

Put the new commits pill under the composer, and pin it when you scroll - #9

Merged
simonhamp merged 1 commit into
mainfrom
feat/pill-placement
Oct 18, 2026
Merged

simonhamp merged 1 commit into
mainfrom
feat/pill-placement

Conversation

@simonhamp

Copy link
Copy Markdown
Member

The "↑ 3 new commits" pill was laid over the top of the list. On the Log it covered the composer's avatar and "What did you ship?". On a profile it sat over the header at the top of the screen.

Now it's placed the way the web places it. The web puts the pill in a strip of its own under the composer, with a border below, and makes the strip sticky under the tabs (resources/js/pages/log/show.tsx). The app does the same:

  • Log: under the composer, above the first day marker and the commits. The composer stays fully visible and usable.
  • Profile: under the Commits and Replies tabs, above the commits.
  • Scrolled down: the strip pins to the top of the list once you scroll past it. On the Log that's under the native tab strip. On a profile the tabs scroll away with the header, so it pins under the nav bar. I went with "wherever the list starts" because that's what a sticky row does natively and it matches the web. The pill is always right above the commits it's about, and the bar it pins under is the one you're looking at.

EDGE tells PHP nothing about where a list is scrolled, so PHP can't move the pill when the composer scrolls away. The list has to pin it natively. That needed a small mobile-ui feature, native:sticky-header, in NativePHP/mobile-ui#138. It's merged into combined/dev-null-app, and this PR's composer.lock moves to that commit (b391517). That commit also has the lane-buttons session's button change, which was already on the branch.

What reviewers should check

  • The slot stays in the tree. 8ab0721 kept the pill's row beside the list, hidden, because a node added beside a scrolled list sometimes drew the list blank on iOS. Now the pill's sticky header is always in the list, hidden and empty until there are new commits, so nothing is ever added beside the list and the list keeps its shape. The profile's list keeps its wrapper column, so the error and refresh banners above it never become its siblings.
  • Pull to refresh is unchanged. At the top, new commits still go straight in and the pill goes away. I checked it on both screens.
  • Profile pager: the swipeable profile tabs work (feat/profile-pager) restructures the tab area. My Profile change is one include moved below page-tabs. Whichever PR lands second should put the pill's include at the top of each page's list, under the tabs.
  • Floating composer (Compose in a sheet from the nav bar, where you are in the log #3) keeps the composer in the list, so nothing changes there. If the composer ever leaves the list, the pill just becomes the list's first row.

Tests

  • LogCacheTest: the old "slot beside the list" test now checks that the pill sits in the list between the composer and the first commit as a sticky_header, hidden and empty before new commits come in, and that nothing sits beside the list before or after.
  • ProfileCacheTest: the same for a profile, between the tabs and the first commit.
  • 628 tests pass. Pint is clean.

Verified on the simulator

iPhone 17 Pro, iOS 27, against devnull.com--timeline.test, with new commits made by tinker for someone local_dev follows.

Log, at the top Log, scrolled Back at the top After pull to refresh
Profile, under the tabs Profile, scrolled Profile, after pull to refresh Dark

Recordings: Log, profile. Both scroll down until it pins, go back up, then pull to refresh. Tapping the pill while it's pinned puts the new commits on top and takes the list back to the top (after). The list drew normally every time, scrolled or not.

Not checked: Android. The mobile-ui side is a stickyHeader item in the LazyColumn, but I haven't run it on a device or emulator.

🤖 Generated with Claude Code

The pill was laid over the top of the list, so on the Log it covered the composer's avatar and "What did you ship?", and on a profile it covered the header.

Now it sits in a strip of its own inside the list, as on the web: under the composer on the Log, and under the Commits and Replies tabs on a profile, above the commits. Once you scroll past it, it pins to the top of the list, under the tabs on the Log and under the nav bar on a profile. EDGE tells PHP nothing about where a list is scrolled, so the list pins it natively with mobile-ui's new sticky header (NativePHP/mobile-ui#138). composer.lock moves combined/dev-null-app to the commit that has it.

The pill's header is always in the list, hidden and empty until there are new commits, so the list keeps its shape when they come in, as the old slot beside the list did. The profile's list keeps its own column so the banners above it never sit beside it.

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