Repository navigation
fix(web): slow scrolls stop snapping back to the end; icon picker chunk shrinks 200x - #66
Merged
Merged
Conversation
Slow upward scrolls snapped the timeline back to the end. Scrolling up collapsed the composer, which shortened the list under the reader; near the end the browser clamped them back, the composer re-expanded, and follow re-armed. The collapse was upstream's feature. Upstream removed it with its setting in behavior. This removes it to match upstream: the composer wiring, the follow hooks, and the composerCollapseOnScroll setting. Mobile web's collapsed composer is upstream's and stays.
The fork's fuzzy icon search imported iconNames from lucide-react/dynamic, which pulls in its map of 1,917 lazy icon imports. Upstream removed that in pingdotgg#20147; a later merge kept the fork's version of the file. Search now ranks upstream's lucideIconNames instead, keeping the fork's fuzzy matching. The icon picker chunk drops from 1.78 MB to 8.6 KB, and the web build emits 50 fewer JS files (-1.9 MB). Also drops buildGitActionProgressStages, which upstream deleted in pingdotgg#22557 and nothing outside its own test still called.
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open issues
What changed in this PR
Aligns the fork’s web behavior with upstream by removing the “composer collapse on scroll” feature (and its setting/wiring) to stop slow upward scrolling from snapping back to the end, while also shrinking the icon picker bundle by avoiding lucide’s dynamic icon map and dropping dead Git action progress helper code.
Changes:
- Removed scroll-collapse composer behavior, its timeline-follow wiring, and
composerCollapseOnScrollsetting + settings UI entries. - Reworked project icon search to use a local
lucideIconNameslist instead oflucide-react/dynamic’siconNamesmap. - Deleted unused
buildGitActionProgressStageslogic and its now-orphaned tests; updated wiki docs/log.
| File | Description |
|---|---|
| wiki/upstream-integration.md | Updates upstream integration notes to document composer scroll-collapse removal and prevent reintroduction on future syncs. |
| wiki/log.md | Logs the correction that composer scroll-collapse was upstream behavior and is now dropped. |
| packages/contracts/src/settings.ts | Removes composerCollapseOnScroll from settings schema and patch schema. |
| apps/web/src/projectIconOptions.ts | Switches icon search source to local lucide name list to drastically reduce bundle size. |
| apps/web/src/components/settings/settingsSearch.ts | Removes settings search entry for the deleted composer-collapse toggle. |
| apps/web/src/components/settings/SettingsPanels.tsx | Removes the deleted composer-collapse toggle from Chat settings panel config. |
| apps/web/src/components/guest/GuestPage.tsx | Updates useTimelineFollow call site after hook input API change. |
| apps/web/src/components/chat/useTimelineFollow.ts | Removes timeline-follow callbacks that drove composer scroll-collapse behavior. |
| apps/web/src/components/chat/ChatComposer.tsx | Removes scroll-collapse state/handlers and simplifies collapse logic to mobile-only. |
| apps/web/src/components/GitActionsControl.logic.ts | Deletes dead buildGitActionProgressStages helper. |
| apps/web/src/components/GitActionsControl.logic.test.ts | Removes tests that only exercised the deleted helper. |
| apps/web/src/components/ChatView.tsx | Stops passing composer-collapse callbacks into useTimelineFollow. |
Review effort: Lite
Comment on lines
3013
to
3020
| composerRef, | ||
| () => ({ | ||
| focusAtEnd: () => { | ||
| revealScrollCollapsedEditor(); | ||
| composerEditorRef.current?.focusAtEnd(); | ||
| }, | ||
| focusAt: (cursor: number) => { | ||
| revealScrollCollapsedEditor(); | ||
| composerEditorRef.current?.focusAt(cursor); | ||
| }, |
Comment on lines
1
to
+5
| import { searchItems } from "@t3tools/shared/searchRanking"; | ||
| import { lucideIconNames } from "./lib/lucideIconByName"; | ||
| export { PROJECT_ICON_COLORS, projectIconColorClassName } from "./projectIconColors"; | ||
|
|
||
| const POPULAR_PROJECT_ICONS: ReadonlyArray<IconName> = [ | ||
| const POPULAR_PROJECT_ICONS: ReadonlyArray<string> = [ |
| @@ -504,7 +504,6 @@ export const ClientSettingsSchema = Schema.Struct({ | |||
| planModeEnabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))), | |||
| contextWindowMeterEnabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))), | |||
| composerRichTextEnabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(true))), | |||
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.

Summary
Scrolling the chat up slowly kept snapping back to the bottom. On a trackpad you could not get more than about 40px into history before the view jumped back to the end.
Scrolling up collapsed the composer, which shrank the space reserved under the timeline. Near the end, the browser clamped the scroll position back to the bottom, the composer expanded again, and auto-follow re-armed and scrolled to the end. Every slow tick repeated that loop.
The collapse was upstream's feature. Upstream removed it, together with its setting, in bd84b17, but this fork's November 1 upstream sync brought it back as if it were fork behavior. This PR removes it to match upstream: the composer wiring, the timeline-follow hooks, and the
composerCollapseOnScrollsetting. The collapsed composer on mobile web is upstream's own and stays. The wiki no longer lists scroll-collapse as retained fork behavior, so the next sync keeps it out.A search for other upstream changes the fork had undone found two more:
iconNamesfromlucide-react/dynamic, which pulls in a map of 1,917 lazy icon imports. Upstream removed that in b47746b, and a later merge kept the fork's version of the file. Search now ranks upstream'slucideIconNamesand keeps the fork's fuzzy matching.buildGitActionProgressStageswas dead code. Upstream deleted it, and nothing here called it except its own test.Before + After
Slow upward scroll from the end, then back down, using real wheel events on a replay thread:
Settings → Chat → Composer:
Web build (
vp build):import()callsTest plan
termnlfinds terminal,git branchfinds git-branch). It no longer offers 252 deprecated lucide aliases, matching upstream; icons already saved under those names still resolve.vp run check:changed: format, lint, knip, typecheck and React Compiler pass.GuestPage.browser.test.tsx("follows the end as replies stream…") fails. It fails the same way onmainwithout this change; not investigated here.bronze-ferret-orchid