Skip to content

feat: stabilize large comment trees#435

Open
christianjuth wants to merge 62 commits intomainfrom
stabalize-comment-tree
Open

feat: stabilize large comment trees#435
christianjuth wants to merge 62 commits intomainfrom
stabalize-comment-tree

Conversation

@christianjuth
Copy link
Copy Markdown
Collaborator

@christianjuth christianjuth commented Apr 22, 2026

Comment tree overhaul

Replaces ad-hoc comment rendering with a proper tree data structure, tested and built bottom-up.

What's in here

  • Comment tree builder — flat comment array → nested tree, with full test coverage
  • Pruning — prevents layout shift as new pages load; new branches appear behind "load more" instead of inserting above already-read content
  • Thread coloring — indent depth grounded by comment path, not render depth, so colors stay consistent when viewing a subtree
  • Selected comment sorts to top — when navigating to a comment permalink, that comment floats to the top of its siblings
  • Refactor & docs — renamed params for clarity (threadRootId, selectedCommentId), documented getCommentPageCursor behaviour, fixed internal typos

github-actions Bot added a commit that referenced this pull request Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

Dependency Graph

Dependency graph — one node per top-level folder in src/

One node per top-level folder in src/. Generated by dependency-cruiser.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 22, 2026

Deploying blorp with  Cloudflare Pages  Cloudflare Pages

Latest commit: bd82829
Status: ✅  Deploy successful!
Preview URL: https://6f53fbad.blorp-6rm.pages.dev
Branch Preview URL: https://stabalize-comment-tree.blorp-6rm.pages.dev

View logs

@christianjuth christianjuth force-pushed the stabalize-comment-tree branch 3 times, most recently from b5efd50 to 7828299 Compare April 24, 2026 01:08
@christianjuth christianjuth changed the title Stabalize comment tree feat: stabilize large comment trees Apr 26, 2026
@christianjuth christianjuth marked this pull request as ready for review April 26, 2026 00:16
@christianjuth christianjuth force-pushed the stabalize-comment-tree branch 5 times, most recently from 450ded0 to 97d5ce7 Compare May 1, 2026 01:50
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Performance Comparison Report

  • Current: HEAD (bd82829) - 2026-05-05 01:10:50Z
  • Baseline: HEAD (b6a21c5) - 2026-05-05 01:10:28Z

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Type Duration Count
PostCardView extra-small/text render 12.7 ms → 12.8 ms (+0.2 ms, +1.3%) 2 → 2
PostCardView large/article render 21.7 ms → 21.9 ms (+0.1 ms, +0.7%) 2 → 2
PostCardView large/image render 21.5 ms → 21.4 ms (-0.1 ms, ±0.0%) 2 → 2
PostCardView large/text render 22.8 ms → 22.6 ms (-0.2 ms, -0.9%) 2 → 2
PostCardView small/image render 18.4 ms → 18.5 ms (+0.1 ms, +0.6%) 2 → 2
PostCardView small/text render 17.6 ms → 17.5 ms (-0.1 ms, ±0.0%) 2 → 2
Show details
Name Type Duration Count
PostCardView extra-small/text render Baseline
Mean: 12.7 ms
Stdev: 0.1 ms (1.1%)
Runs: 12.6 12.7 12.7 12.6 12.6 12.6 12.8 13.0 12.6 12.5 13.0 12.6 12.9 12.6 12.5 12.7 12.6 12.6 12.7 12.6
Warmup runs: 13.5
Removed outliers: (none)

Current
Mean: 12.8 ms
Stdev: 0.5 ms (3.8%)
Runs: 12.8 12.7 12.7 12.8 12.7 12.8 13.0 13.5 13.3 12.9 12.7 14.6 12.8 12.4 12.5 12.6 12.5 12.5 12.6 12.5
Warmup runs: 13.1
Removed outliers: (none)
Baseline
Mean: 2
Stdev: 0 (0.0%)
Runs: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Render issues:
- Initial updates: 1

Current
Mean: 2
Stdev: 0 (0.0%)
Runs: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Render issues:
- Initial updates: 1
PostCardView large/article render Baseline
Mean: 21.7 ms
Stdev: 0.2 ms (1.0%)
Runs: 21.9 21.7 21.5 21.7 21.9 21.9 21.8 21.7 21.6 22.3 21.6 21.5 21.4 21.4 21.7 21.5 21.9 21.8 21.8 21.5
Warmup runs: 22.6
Removed outliers: (none)

Current
Mean: 21.9 ms
Stdev: 0.3 ms (1.4%)
Runs: 22.4 22.3 22.1 21.7 22.2 22.1 21.6 21.4 22.3 22.1 21.9 21.6 21.7 21.4 21.5 21.6 22.0 21.9 21.6 21.7
Warmup runs: 22.8
Removed outliers: (none)
Baseline
Mean: 2
Stdev: 0 (0.0%)
Runs: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Render issues:
- Initial updates: 1

Current
Mean: 2
Stdev: 0 (0.0%)
Runs: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Render issues:
- Initial updates: 1
PostCardView large/image render Baseline
Mean: 21.5 ms
Stdev: 0.3 ms (1.6%)
Runs: 21.9 21.9 21.7 22.5 21.2 21.3 21.8 21.5 21.6 21.6 21.4 21.3 21.4 21.3 21.8 21.2 21.1 21.3 21.4 21.2
Warmup runs: 22.2
Removed outliers: (none)

Current
Mean: 21.4 ms
Stdev: 0.3 ms (1.2%)
Runs: 21.4 21.4 21.5 21.7 21.4 21.2 21.0 21.4 21.2 21.6 21.3 21.4 21.2 21.0 21.1 21.8 22.0 21.4 21.7 21.5
Warmup runs: 22.4
Removed outliers: (none)
Baseline
Mean: 2
Stdev: 0 (0.0%)
Runs: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Render issues:
- Initial updates: 1

Current
Mean: 2
Stdev: 0 (0.0%)
Runs: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Render issues:
- Initial updates: 1
PostCardView large/text render Baseline
Mean: 22.8 ms
Stdev: 1.3 ms (5.8%)
Runs: 25.3 24.3 23.4 22.9 22.5 22.5 26.2 23.9 23.6 22.0 22.7 21.7 21.7 21.3 22.0 21.3 21.4 22.7 22.3 22.0
Warmup runs: 85.0
Removed outliers: (none)

Current
Mean: 22.6 ms
Stdev: 1.2 ms (5.1%)
Runs: 25.6 24.6 23.4 23.3 22.7 22.4 22.4 24.1 23.2 22.6 22.6 22.2 21.8 21.7 21.4 21.4 21.5 21.8 21.7 21.2
Warmup runs: 88.3
Removed outliers: (none)
Baseline
Mean: 2
Stdev: 0 (0.0%)
Runs: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Render issues:
- Initial updates: 1

Current
Mean: 2
Stdev: 0 (0.0%)
Runs: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Render issues:
- Initial updates: 1
PostCardView small/image render Baseline
Mean: 18.4 ms
Stdev: 0.2 ms (1.0%)
Runs: 18.6 18.4 18.6 18.4 18.3 18.3 18.1 18.1 18.4 18.5 18.3 18.2 18.2 18.9 18.5 18.4 18.3 18.2 18.4 18.3
Warmup runs: 18.5
Removed outliers: (none)

Current
Mean: 18.5 ms
Stdev: 0.2 ms (1.3%)
Runs: 18.4 18.6 18.2 18.1 18.3 18.4 18.2 18.6 18.5 18.8 19.0 18.4 18.4 18.6 19.0 18.6 18.4 18.4 18.5 18.3
Warmup runs: 18.5
Removed outliers: (none)
Baseline
Mean: 2
Stdev: 0 (0.0%)
Runs: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Render issues:
- Initial updates: 1

Current
Mean: 2
Stdev: 0 (0.0%)
Runs: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Render issues:
- Initial updates: 1
PostCardView small/text render Baseline
Mean: 17.6 ms
Stdev: 0.2 ms (1.0%)
Runs: 17.5 17.6 17.6 17.8 17.4 17.7 17.8 18.0 17.6 17.8 17.6 17.6 17.6 17.5 17.4 18.0 17.6 17.6
Warmup runs: 18.1
Removed outliers: 24.0 21.1

Current
Mean: 17.5 ms
Stdev: 0.2 ms (1.3%)
Runs: 17.7 18.1 17.4 17.7 17.8 17.4 17.3 17.6 17.5 17.3 17.4 17.3 17.4 17.8 18.0 17.7 17.4 17.4 17.4 17.4
Warmup runs: 18.0
Removed outliers: (none)
Baseline
Mean: 2
Stdev: 0 (0.0%)
Runs: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Render issues:
- Initial updates: 1

Current
Mean: 2
Stdev: 0 (0.0%)
Runs: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Render issues:
- Initial updates: 1

Render Count Changes

There are no entries

Render Issues

Name Initial Updates Redundant Updates
PostCardView large/text 1 🔴 -
PostCardView large/image 1 🔴 -
PostCardView large/article 1 🔴 -
PostCardView small/text 1 🔴 -
PostCardView small/image 1 🔴 -
PostCardView extra-small/text 1 🔴 -

Added Entries

There are no entries

Removed Entries

There are no entries

christianjuth and others added 29 commits May 4, 2026 21:08
@christianjuth christianjuth force-pushed the stabalize-comment-tree branch from 97d5ce7 to bd82829 Compare May 5, 2026 01:10
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