Skip to content

Conversation

@dinhlongviolin1
Copy link
Contributor

@dinhlongviolin1 dinhlongviolin1 commented Oct 29, 2025

Describe Your Changes

  • Bring back out scroll behavior
  • Add settings section for the behavior
  • rename appearance to interface
  • migration for old settings from appearance to new localstorage interface
  • fix re render issue for entire stream message after streamming ended

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Copilot AI review requested due to automatic review settings October 29, 2025 18:02
@dinhlongviolin1 dinhlongviolin1 changed the title support 2 type of scroll behavior with proper settingsak support 2 type of scroll behavior with proper settings Oct 29, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

Preview URL: https://6ed63adb.docs-9ba.pages.dev

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors "Appearance" settings to "Interface" settings throughout the application, better reflecting the scope of these settings. The key changes include renaming hooks, routes, and translation keys, while adding new thread scroll behavior functionality with two modes: "Flow" (ChatGPT-style anchoring) and "Sticky" (auto-follow streaming).

Key Changes

  • Renamed useAppearance hook to useInterfaceSettings with improved storage migration logic
  • Added thread scroll behavior feature with Flow and Sticky modes, including animated preview components
  • Updated all translation files, routes, and UI components to reflect the "Interface" naming

Reviewed Changes

Copilot reviewed 46 out of 46 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
web-app/src/hooks/useInterfaceSettings.ts Core hook renamed from useAppearance with added threadScrollBehavior state and migration utilities
web-app/src/hooks/useThreadScrolling.tsx Enhanced with Flow/Sticky scroll mode support and conditional behavior logic
web-app/src/containers/ThreadScrollBehaviorSwitcher.tsx New component with interactive preview animations for scroll behavior selection
web-app/src/routes/settings/interface.tsx Settings page renamed from appearance.tsx with added scroll behavior controls
web-app/src/constants/threadScroll.ts New constants file defining scroll behavior types and validation
web-app/src/locales/*/settings.json Updated translation keys from "appearance" to "interface" across all languages
Comments suppressed due to low confidence (2)

web-app/src/hooks/useInterfaceSettings.ts:526

  • Inconsistent indentation on line 519: appLeftPanelTextColor is indented with extra spaces compared to surrounding lines.
    web-app/src/hooks/useInterfaceSettings.ts:15
  • Unused import THREAD_SCROLL_BEHAVIOR.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 46 out of 46 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (2)

web-app/src/locales/en/settings.json:1

  • Trailing whitespace on empty lines should be removed.
{

web-app/src/hooks/useInterfaceSettings.ts:15

  • Unused import THREAD_SCROLL_BEHAVIOR.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

Barecheck - Code coverage report

Total: 29.6%

Your code coverage diff: -0.47% ▾

Uncovered files and lines
FileLines
web-app/src/routeTree.gen.ts13-36, 40-44, 46-50, 52-56, 58-62, 64-68, 70-74, 76-80, 82-86, 88-92, 94-98, 100-104, 106-110, 112-116, 118-122, 124-128, 130-134, 136-140, 142-146, 148-152, 154-158, 160-164, 166-171, 173-177, 533-557, 559-561
web-app/src/containers/ChatWidthSwitcher.tsx1-5, 7-9, 11-18, 20-25, 27-46, 48-53, 55-69, 71
web-app/src/containers/ColorPickerAppAccentColor.tsx1-5, 11-12, 14-26, 28-34, 36-58, 60, 62-67, 69-76, 78-89, 91
web-app/src/containers/ColorPickerAppBgColor.tsx1-5, 10-11, 13-17, 20-22, 24-49, 51-63, 66-68, 70-72, 74-96, 98, 100-105, 107-113, 115-122, 124
web-app/src/containers/ColorPickerAppDestructiveColor.tsx1-5, 10, 12-14, 16-43, 45-67, 69, 71-76, 78-85, 87-98, 100
web-app/src/containers/ColorPickerAppMainView.tsx1-5, 10, 12-14, 16-30, 32-54, 56, 58-63, 65-71, 73-80, 82
web-app/src/containers/ColorPickerAppPrimaryColor.tsx1-5, 11-12, 14-39, 41-63, 65, 67-72, 74-81, 83-94, 96
web-app/src/containers/FontSizeSwitcher.tsx1, 7-9, 11-13, 15-20, 22-35, 37-41, 43
web-app/src/containers/ScrollToBottom.tsx1-10, 12-15, 18-27, 29, 31-35, 37-46, 48-53, 55-57, 59-60, 62, 64, 66
web-app/src/containers/SettingsMenu.tsx37, 39-40, 232-234
web-app/src/containers/ThreadScrollBehaviorSwitcher.tsx1-6, 8-10, 12-14, 16-34, 36, 47-62, 64-67, 69-81, 83-87, 89, 91-93, 95, 97-101, 103-104, 106, 108-109, 111, 113-118, 120-123, 125-126, 128-130, 132-137, 139-141, 143-150, 152-155, 157-174, 176-186, 188-194, 196-200, 202-211, 213-215, 217-226, 228-231, 233-238, 240-241, 243-251, 253-259, 261-273, 275-283, 285-297, 299, 301-302, 304, 306-309, 312-321, 323-325, 327-329, 331-343, 345-362, 364-376, 378-381, 383-388, 390-393, 395-397, 399-405, 407-412, 414-421, 423-425, 427-428, 430-441, 443-448, 450-464, 466-467, 469, 471-477, 479-487, 489, 491-492, 494, 496-498, 500-504, 508-517, 519-526, 528, 530-538, 540-541, 543, 545-548, 551-553, 555-562, 564-575, 577
web-app/src/hooks/useInterfaceSettings.ts85-86, 128-130, 184-185, 217, 220-221, 226-227, 229-240, 242-246, 248, 250-251, 254-255, 257-258, 260-261, 263-264, 267-268, 270-271, 276, 278-280, 282-285, 287-290, 292, 294-296, 298-303, 305-309, 312-321, 323-326, 328-330, 332-340, 345-347, 349-352, 354-357, 359-360, 362-386, 388-389, 393-394, 414, 431, 448, 465, 482, 560-561, 591, 611-614, 639, 666-669, 694, 720-723, 748, 774-777, 802, 828, 830-833, 836, 840, 842-847, 849-854, 856-861, 863-868, 872-878, 880-886, 888-894, 896-902, 904-910, 913-917, 919-922, 924-927, 929-932, 934-937, 939-942, 945, 947, 949-950, 952-953, 955-958, 961, 963, 965-966, 968-970, 972-975, 978, 980, 982-983, 985-987, 989-992, 995, 997, 999-1000, 1002-1004, 1006-1009, 1013, 1016-1017
web-app/src/hooks/useMessages.ts79-80
web-app/src/hooks/useThreadScrolling.tsx1-5, 7-9, 11-32, 34-38, 40-42, 44-46, 48-55, 58-59, 61-66, 68-74, 76-84, 87-95, 97-100, 102-112, 114-130, 132-143, 145-152, 154-156, 158-160, 162-164, 166-175, 177-185, 187-190, 192-194, 196-197, 200-206, 208, 210-217, 219-220, 222-223, 225-227, 229-232, 234-236, 239-242, 244-245, 247-249, 252-253, 255-260, 262-268, 270-273, 275-276, 278-279, 281-285, 287-292, 294-295, 297-327, 329-333, 335-340, 342-347, 349-361, 364, 366-371, 373-381
web-app/src/providers/InterfaceProvider.tsx1-4, 17-32, 36-42, 45-47, 50-51, 53-54, 57, 59, 62-63, 65-75, 79, 82-88, 90-96, 98-104, 106-112, 114-120, 123-127, 129-159, 162-165, 168-171, 174-177, 180-183, 186-204, 207, 209-220, 227, 229-230, 232-234, 236-240, 243, 245-246, 248-250, 252-256, 259, 261-262, 264-266, 268-272, 275, 277-278, 280-282, 284-288, 291, 293-294, 296-300, 302-314, 316-317
web-app/src/routes/__root.tsx1, 4-26, 31-38, 40-43, 45-53, 56, 59-62, 65-73, 76-80, 82-84, 87-91, 93, 95-97, 100-102, 104-109, 111-115, 117-118, 120-123, 127-131, 134-138, 140-143, 146, 149-156, 158, 160, 163-167, 169-173, 175-177, 179, 181, 183-187, 189-196, 198, 200-206, 208, 210-224, 227-233, 235
web-app/src/routes/project/$projectId.tsx1-2, 4-6, 8-11, 13-19, 21-23, 25-29, 31, 33-37, 39-40, 43, 46-50, 52-63, 65, 67-72, 74-75, 77-83, 85-97, 99, 102-108, 110-125, 127-130, 132-137, 139-145, 147
web-app/src/routes/threads/$threadId.tsx1-6, 8-13, 15-30, 32, 34-51, 53, 56-57, 59, 61, 63, 65-70, 73-77, 79-87, 89-92, 94-98, 101-102, 106-109, 111-113, 115-120, 122-126, 128-133, 135, 137-142, 144-148, 150-151, 154-156, 158, 160-161, 163-164, 166, 168-184, 186-192, 194-203, 205, 207, 209-215, 217-228, 230-231, 233-235, 238-241, 243-244, 246-252, 254-263, 266-269, 271-276, 278-283, 285, 287-290, 292-299, 301

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 47 out of 47 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

web-app/src/hooks/useInterfaceSettings.ts:233

  • The type assertion on line 232 could be avoided by checking the property existence first. Consider refactoring to: if (state.threadScrollBehavior !== undefined && !isThreadScrollBehavior(state.threadScrollBehavior)) to avoid unnecessary type casting.
    web-app/src/hooks/useInterfaceSettings.ts:532
  • The hardcoded '#FFF' values for text colors on lines 527-530 should be extracted to named constants (e.g., DEFAULT_WHITE_TEXT_COLOR) for better maintainability and consistency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@louis-jan louis-jan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dinhlongviolin1 dinhlongviolin1 merged commit 7b634f0 into dev Nov 1, 2025
24 checks passed
@github-project-automation github-project-automation bot moved this to QA in Jan Nov 1, 2025
@dinhlongviolin1 dinhlongviolin1 deleted the feat/multiple-scroll-behavior branch November 1, 2025 09:12
@github-actions github-actions bot added this to the v0.7.4 milestone Nov 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: QA

Development

Successfully merging this pull request may close these issues.

4 participants