Skip to content

Open every level of replies in place on the commit page, and move the page within its tree - #196

Draft
simonhamp wants to merge 12 commits into
feat/self-threadsfrom
feat/nested-replies
Draft

simonhamp wants to merge 12 commits into
feat/self-threadsfrom
feat/nested-replies

Conversation

@simonhamp

@simonhamp simonhamp commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Changes to the commit page, one commit each.

f03090c: a reply's "N replies" used to open that reply's own page, so going deeper meant pushing screen after screen. Now it opens the replies under it in place, and theirs under them, as deep as they go. This is what the web's commit page does.

a0032d3: tapping a commit that's already in the page's tree (an ancestor, a series or self-thread part, a reply at any depth) moves the same page to it instead of pushing another commit screen. Commits outside the tree, profiles and links still push.

Merge order: this is based on #195 (feat/self-threads) and has #179 (feat/log-threads) merged in. It reuses #179's ExpandsThreads and ThreadRows, and #179 and #195 conflict, so the branch carries a merge commit (083085a) resolved the same way as the phone build (2c46223), with its thread test fixtures. Merge #179 and #195 first; then this diff shrinks to this PR's own commits.

How the web does it

From resources/js/components/commit-thread.tsx on production:

  • maxIndentDepth = 3. The commit's replies are depth 1 and sit under the commit's text. Depth 2 and 3 each step in one indent.
  • Replies at depth 4 and deeper stay in the depth 3 column. They get no elbow or line, and a "↳ replying to @handle" line (or "quoting") under the name.
  • Every reply has its own toggle, so any level opens in place. "Show more" past the cap reads "Show N more to @handle".
  • A reply that its author carried on as a self-thread leaves the continuation out of its replies and shows "Show thread", which opens its page.

What changed

  • ThreadRows::under() is recursive now. It caps the indent at the web's depth (MaxIndentDepth) and takes how deep replies open in place (opensInPlace). The commit page passes no limit. The Log still passes 1, so on the Log a reply's replies still open its page. That's one argument to change if you want the Log to go deeper too.
  • The commit page uses ExpandsThreads for replies of replies. It replaces the page's own one-level mechanism for a deleted reply's replies (tombstoneReplies, toggleTombstone), which is gone.
  • Rail drawing follows the existing style: an elbow for the first reply and a link from avatar to avatar after that, with lines from further up carried past as $spines (this was a single $spine). At the third step each reply hangs on its own elbow off the line of the reply it answers, like the web. A line from avatar to avatar would otherwise run through the flattened replies lined up under it.
  • "Show more" on the commit page is now a row of its own, as on the Log, rather than tucked into the last reply. The inline thread-more partial is deleted.
  • Related commits, and the series or thread parts below the commit, keep their old "N replies" button, which moves the page to them. The commits above the commit open theirs in place (16f3839, below).

Moving the page within the tree (a0032d3)

  • The tapped commit becomes the one the page is about. Its ancestors come from the tree above it and its replies come from what's already loaded (opened in place, read for the self-thread, or kept in the cache). So nothing goes blank, and devnull is asked for the rest behind it.
  • The commits above the one the page moves to start with their replies folded, showing only their "N replies" (d204792, below). Moving up, the commit the page moves to shows its replies, and the commit it was on and the ones in between open their kept replies under it, so you can still see where you came from.
  • Reply on a commit in the tree moves the page to it too, with the reply bar answering it.
  • Back still pops the whole screen, as you asked. There's no history of the commits the page moved through. The web does a full page visit for each commit, so there it's browser history, which we're not copying.
  • Deleting a commit the page moved to takes the page back to its parent. Deleting the commit the page opened on still leaves the screen.
  • The rows are now direct children of the scroll view, which lets auto-scroll-to bring the commit into view, with all its ancestors shown above it.

Animating the move (10cca47)

This needs NativePHP/mobile-air#736 and NativePHP/mobile-ui#225. Without them the app still works, but the move jumps and going back to a row the page already went to doesn't scroll.

  • The scroll view has animate-layout, so rows the page keeps slide to their new places and rows it adds or drops fade. It also has auto-scroll-animated, so the first move animates as well.
  • The focused commit is keyed commit-<id>, the same as the commits above it, so moving up the tree slides that row into place. A reply that becomes the focused commit is still a different row (thread-reply-<id> before, commit-<id> after), so that one fades across.
  • Going back to the top twice used to mount the scroll view again to make it scroll. It now passes $scrollRequest as auto-scroll-token, which goes up on every move. Remounting would have made every row new and spoiled the animation.
  • Vendor patches for a phone build are in storage/app/patches/ (mobile-air-736-layout-animation.patch, mobile-ui-225-layout-animation.patch).

Replies of the commits above (16f3839)

  • The commits above the one the page is on keep their "N replies" button, and it opens their replies in place under them, as the commit's and every reply's do. Their replies' replies open in place too.
  • The reply on the line down to the commit is left out of that list and of its count, since it already shows right below. So a commit above with only that reply has no button. The web doesn't do this: it only leaves out the part of a self-thread that carries the thread on, so there the rest of the line would show twice.
  • Closing a commit's replies used to close every thread opened inside it. For a commit above, that would have closed the replies of the commits on the line too, so ExpandsThreads now skips any reply the screen draws as its own row (drawsOnItsOwn, only overridden on the commit page).
  • Opening or closing them after a move leaves the scroll target alone, so the page doesn't jump back to the commit.

Folded replies above the commit (d204792)

You asked for the commits above to show their replies behind the button, folded, when you're on a reply. Before this, moving down to a reply kept the replies of the commit you left open under it, and any you'd opened on a commit above stayed open.

  • Every move now folds the replies of every commit above the new one, including the one the page was on when it moves down. Opening the page on a reply already started folded.
  • Moving up is unchanged for the commit you move to: its replies show, with the way back down opened under it. The commits above it fold like on any move.
  • The reply on the line down is still left out of each commit's list and count.
  • The scroll target after a move is the number of commits above again, since nothing is open above the commit then.
  • Moving back up to a commit takes its replies from the cache now, because folding drops what the page held for it. Only the first page comes back that way. Later pages load again with "Show more".

Six mentions at most (056deb8)

The reply bar's @mention suggestions could grow tall enough to push the field and the bar's buttons under the keyboard. devnull's search sends people and organizations with no limit the app sets.

  • Past six rows, partials/mention-suggestions puts the rows in a scroll view six rows tall (Display::MentionRowsShown times Display::MentionRowHeight, 6 x 44). Each row is then exactly 44 so six fill it. Six or fewer draw as before, as tall as their rows.
  • The scroll view is inside the suggestions column, inside the slot, so the field's row never moves among its siblings.
  • The Messages composer and the commit sheet use the same partial, so they get the cap too. Messages only suggests an org's members, ranked and already cut to six, so it never reaches the scroll view.
  • A caller that scrolls the list itself passes 'scrolls' => false (f9832b5), and the rows draw as tall as they are with no scroll view inside. It defaults to true. Fill the composer sheet with the field, and float mentions over it #198's sheet sizes and scrolls its own list and passes it, so once both merge a short phone doesn't show two scroll bars there.
  • Display::replyBarClearance doesn't count the suggestions, and didn't before. They only show while you type a handle, and the cap now bounds how far they can lift the bar.

Hash at the top right (5c5d26b)

The focused commit's short hash moved from under its text to the end of the name, handle and time row, pushed right by a spacer. Same size and ink, and still plain text as before. No other row on the page shows a hash, so nothing else moved.

Watch for

  • The new $spines and the third-level elbows, and the replies opened under a commit above, have only been checked through the rendered tree in tests, not on a device. The x positions are 31.5 (rail), 75.5 and 107.5 (reply lines).
  • The mention scroll view sits in the bar above the keyboard, and iOS scroll views here dismiss the keyboard interactively. Scrolling the list shouldn't drag into the keyboard, but it's worth a try on a phone.
  • RowCacheScreensTest now expects one fewer rebuilt row when a page of replies arrives, because the last reply no longer carries "Show more".

Tests

php -d auto_prepend_file= artisan test: 1992 passed, 1 skipped on current vendor. Before 16f3839 it was 1984 passed with the two vendor patches applied (in a scratch copy); that wasn't rerun. New: tests/Unit/Devnull/ThreadRowsTest.php (indent cap, flattened rows, third-level elbows and lines, open-in-place depth) and tests/Feature/Screens/NestedRepliesTest.php (opening five levels in place without navigating, closing a middle level, the indents and "replying to" labels, moving the page within the tree and back up, Reply retargeting the bar, commits outside the tree still pushing). Tests that expected a tap in the tree to push now expect the page to move. 10cca47 adds two to NestedRepliesTest: the focused row and the scroll view keep their node ids across a move, and the scroll view gets the new props with a fresh token when it goes back to a row it went to before (skips until vendor has #736, see Tests\Support\LayoutAnimation). 16f3839 adds three more: a commit above opening its other replies without the one on the way down, the scroll target after a move counting them, and closing a commit's replies above leaving the line's open. The hash test now checks it ends the name row. d204792 replaces two of 16f3839's tests and adds two: moving down folds the commits above (the commit left and one opened by hand), moving back up opens them again, and opening on a reply starts folded. 056deb8 adds two to CommitMentionsTest: eight suggestions scroll in a list six rows tall with the bar's slots in place, and six don't scroll. f9832b5 adds MentionSuggestionsTest, which renders the partial on its own through a test component and view (tests/Fixtures/views): eight rows scroll by default, and with 'scrolls' => false all eight draw with no scroll view.

Screenshots

No device build for this one, so there are no screenshots yet. It does change what the commit page draws.

  • No visible change

🤖 Generated with Claude Code

simonhamp and others added 6 commits November 16, 2026 00:23
…ith the actions

Replies no longer show under a commit in a feed. The replies button moves
to its own line under the action row and opens the thread in place, ten
replies at a time, with Show more for the next ten. A reply has the same
button under its own actions, which opens its replies inline one step in.
Deeper than that, the button opens the reply's page.

devnull's API sends 50 replies a page whatever `limit` asks for, so the
app keeps what it was sent and shows ten at a time, asking for the next
page only once they all show.

The end dot of a commit's rail is now drawn inside its action row, so it
sits level with the actions whatever is above or below them. It used to
be placed a fixed distance from the row's bottom, which assumed the action
row's -my-[6] pulled it in. iOS does that, Android keeps the space and only
moves the drawing, and a row with a thread under it had no bottom padding,
so the dot sat above the actions in some rows and below in others. The
action row now has no vertical negative margins, and the rail's lines are
worked out from the fixed heights under it to meet the dot.

Opening and closing a thread fades its rows in and out, and the chevron
turns. Starring a commit pops the star as the web's star-pop does, and
giving a pastel bumps it as the web's pastel button does. EDGE only animates
from one frame to the next, so each step is a frame drawn when a short
background Beat comes back.

Quote now has its label beside its icon, as Reply always does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the Log, opening or closing a commit's replies dropped or added the 7pt
under its replies line, where the hairline sits. When the commit's top was
off screen, the iPhone's list held the row below still instead, so the
commit's photo jumped by 7pt.

The row now keeps that padding, the hairline's 1pt included, with its
replies open, and only the hairline goes. The first reply takes the 7pt
off its own top, so the thread looks the same, and the elbow and the
lines beside a reply are placed from its avatar. The commit page is left
as it was: it's a scroll view, which holds its top.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e Log

The replies button's chevron only turned in feeds, where the replies open
in place. A commit page opens its commit's replies in place too, but there
the chevron kept pointing right with "Hide replies" beside it. It now
turns down there as well, over the same 220ms, and carries the animation
while shut so iOS animates the first turn. A reply's button on a commit
page still opens its page, so its chevron stays put.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nested replies on the commit page reuse #179's ExpandsThreads and
ThreadRows, so this branch carries #179 on top of #195. Conflicts are
resolved as on the phone build (2c46223): #195's Show thread and
self-thread filtering sit in #179's ExpandsThreads, and the replies line
under a commit row leaves room only when its replies button shows. The
thread fixtures from 2c46223 are in too, so #179's tests don't turn
into self-threads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reply's "N replies" on the commit page used to open that reply's own
page. Now it opens its replies under it, and theirs under them, as deep
as they go, the way the web's commit page does. Tapping a reply still
opens its page.

The rows come from #179's ThreadRows, now recursive, and the threads
from ExpandsThreads, which replaces the page's separate mechanism for a
deleted reply's replies. Indentation stops at the web's depth of three
(maxIndentDepth in commit-thread.tsx). Replies at the third step hang
on their own elbow off the line of the reply they answer, and deeper
ones line up under them with no lines and a "replying to @handle" line.
"Show more" is a row of its own on the page too, as on the Log, and says
"to @handle" past that depth.

The Log keeps opening only the commit's replies in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tapping an ancestor, a part of the series or the author's thread, or a
reply at any depth used to push a new commit screen. Now the same page
moves to it: the commit becomes the one the page is about, with what's
above it as its ancestors and its replies showing below, built from
what the page already has so nothing goes blank. The commit it was on
keeps its replies opened, so going back up shows where you came from.
Reply on a commit in the tree retargets the reply bar the same way.
Commits outside the tree still push.

Back still leaves the screen, as Simon asked. There's no history of the
commits the page moved through.

The scroll view's rows are its own children now, so auto-scroll-to can
bring the commit into view. Both platforms jump on the first request
and animate later ones. Deleting a commit the page moved to takes the
page back to its parent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonhamp simonhamp changed the title Open every level of replies in place on the commit page Open every level of replies in place on the commit page, and move the page within its tree Nov 21, 2026
simonhamp and others added 5 commits November 21, 2026 03:05
The scroll view now has animate-layout, so the rows the page keeps slide
to their new places and the ones it adds or drops fade, and
auto-scroll-animated, so the first move animates too. The focused commit
is keyed commit-<id>, as it is among the commits above it, so moving up
the tree slides that row rather than redrawing it.

Going back to a row the scroll view already went to used to mount the
scroll view again, which would make every row new. It now passes a new
auto-scroll-token instead.

These need NativePHP/mobile-air#736 and NativePHP/mobile-ui#225. Without
them the move jumps, as before, and asking for the same row twice in a
row doesn't scroll. The test that reads the new props skips until vendor
has them (Tests\Support\LayoutAnimation).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It sat under the commit's text. Now it ends the row with the name, handle
and time, pushed right by a spacer, in the same size and ink. Only the
focused commit shows a hash, so no other rows change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The commits above the one the page is on keep their "N replies" button,
and it now opens their replies in place under them, like the commit's and
every reply's, instead of moving the page there.

The reply on the line down to the commit is left out of the list and of
the count, since it already shows below. Closing an ancestor's replies
leaves the replies of the commits on the line open (drawsOnItsOwn in
ExpandsThreads). After a move the scroll target counts the rows opened
above the commit, and opening or closing them later doesn't scroll.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The commits above the one the page is on now start with their replies
folded behind "N replies", whether the page opened on a reply or moved
down to one. Before, moving down kept the replies of the commit the page
left open under it, and any opened on a commit above stayed open.

Moving up, the commit the page moves to shows its replies with the way
back down opened, as before. The scroll target after a move is just the
ancestor count again, since nothing is open above the commit then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With more than six people and organizations to suggest, the rows sit in
a scroll view six rows tall inside the suggestions, so the list can't push
the field and the bar's buttons down under the keyboard. Six or fewer are
drawn as before, as tall as their rows. The slot around the list keeps its
place, so the field's row doesn't move among its siblings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…scroll

The composer sheet in #198 sizes its mention list and scrolls it. With more
than six rows the partial's own six-row scroll view sat inside that one, so
a short phone showed two scroll bars. 'scrolls' => false draws every row as
tall as it is with no scroll view inside. It defaults to true, so the reply
bar and the conversation bar keep their six-row list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp added a commit that referenced this pull request Nov 21, 2026
The sheet sizes its mention list and scrolls it. #196 gives the shared
mention list a six-row scroll view of its own, so once both are merged a
list of more than six would show two scroll bars on a short phone. The
sheet now passes 'scrolls' => false, which #196 adds. Before #196 merges
the partial ignores it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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