Skip to content

⚡ Bolt: Optimize chat history loading performance#10

Open
ArnBdev wants to merge 5 commits intomasterfrom
bolt/optimize-chat-history-loading-2090644113425917401
Open

⚡ Bolt: Optimize chat history loading performance#10
ArnBdev wants to merge 5 commits intomasterfrom
bolt/optimize-chat-history-loading-2090644113425917401

Conversation

@ArnBdev
Copy link
Copy Markdown
Owner

@ArnBdev ArnBdev commented Feb 3, 2026

💡 What: Implemented parallel message rendering and batched scrolling for chat history loading.
🎯 Why: Loading chat history was sequential and caused layout thrashing due to scrolling after every message.
📊 Impact: Reduces initial load time for long sessions and eliminates visual jitter.
🔬 Measurement: Verified with unit tests ensuring scrollToBottom is called once and messages render in parallel.


PR created automatically by Jules for task 2090644113425917401 started by @ArnBdev

ArnBdev and others added 5 commits February 1, 2026 19:01
- Added Trusted Mode (alwaysAllowReadWrite) to bypass tool confirmations.\n- Added fetch_url alias for web_fetch for agent compatibility.\n- Added UpdateFrontmatterTool and AppendContentTool for improved Bases integration.\n- Updated README.md.\n\nNote: This code was written with Gemini 3 thinking in Google Antigravity.
Co-authored-by: ArnBdev <207385326+ArnBdev@users.noreply.github.com>
…314617928267464

Fix PR feedback: Trusted Mode modal, safety checks, and formatting
- Parallelize Markdown rendering for chat history messages
- Batch scroll-to-bottom operation to run once after all messages are rendered
- Add unit test to verify optimization logic

Co-authored-by: ArnBdev <207385326+ArnBdev@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

ArnBdev pushed a commit that referenced this pull request Feb 9, 2026
…on#351)

* fix: resolve ReDoS vulnerability in table divider regex

The table divider regex in agent-view-messages had two adjacent \s*
quantifiers that overlapped when \|? didn't match, causing polynomial
backtracking on strings with many spaces (CodeQL js/polynomial-redos,
code-scanning alert #10).

Fix by merging the leading whitespace and optional pipe into a single
character class. Also extract the markdown formatting logic into a
reusable utility with dedicated tests.

Resolves code-scanning alert #10.

* fix: deduplicate streaming formatter and fix escaped pipe handling

- Replace duplicated formatting logic in finalizeStreamingMessage with
  formatModelMessage(), removing ~50 lines of duplicate code that also
  contained the original escaped-pipe and ReDoS bugs
- Fix nextLine.includes('|') to use hasUnescapedPipe(nextLine) so
  escaped pipes no longer suppress paragraph spacing
- Add test for escaped-pipe paragraph spacing
- Relax ReDoS regression test threshold to 1000ms for CI stability

* refactor: rename constant to camelCase and prevent duplicate blank lines

Rename TABLE_DIVIDER_RE to tableDividerRe for naming consistency. Add
guards to prevent consecutive blank lines when table-ending and
paragraph-spacing logic both trigger on the same line.
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