Repository navigation
Drop the inline composer from the Log - #14
Merged
Merged
Conversation
Typing fast into the composer at the top of the Log lost letters and put them out of order. The field sat in the Log's list, and every sync of the draft redrew the whole log, so the field kept getting text that was a few keystrokes old. The compose sheet and the reply box don't have the problem. The compose button in the nav bar already opens a composer in a sheet from anywhere in the log, like Twitter's. So the inline field goes, along with its draft, budget, Commit button and staged avatar. The new commits pill is now the first row of the list. The sheet keeps the web's commit draft stash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Typing fast into the composer at the top of the Log lost letters and put them out of order. The compose sheet and the reply box don't do this.
The inline field sat in the Log's list, and the Log sends every frame in full. So every sync of the draft (debounced at 150ms) redrew the whole log, around 2,000 to 3,000 nodes, while you kept typing, and the field kept being given text that was a few keystrokes old. The sheet and the reply box live outside a list, in much smaller trees.
The nav bar's compose button already opens a composer in a sheet from anywhere in the log, like Twitter's, so the inline composer goes rather than being fixed. Simon decided that while testing on his phone.
What changed
partials/composer.blade.php.Logloses the inline draft and everything that drove it:body,composing,composerKey,draftRestored,commit(),dropStash(),updatedBody(),closeEmptyComposer()andcomposeSheetClosed(). The sheet's commit still goes on top throughshowCommitted().OpensCommitSheetno longer hands the sheet's draft back to an inline composer when it closes. The sheet still stashes the web'scommitdraft and restores it withstash@{0}anddrop.Tests
ComposerTest is deleted, since every test in it was about the inline field. The sheet already covers what still applies: Commit disabled until the draft is long enough, the budget, the error keeping the draft, and the commit going on top. Tests that made a commit through the inline field now use the sheet. The inline-only stash, lane button and staged avatar cases are gone. 812 tests pass, and Pint and PHPStan are clean.
What to check
🤖 Generated with Claude Code