You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf: index graph parents and successors for reply paths - #1417
Building reply paths repeatedly searches every measured graph node for a parent’s replies and continuation. This groups those relationships once, so each lookup scans the matching nodes in their original order.
All 33 graph-edge tests passed, along with TypeScript checks and the build. I also compared complete edge results with the original implementation for small graphs, many unrelated threads, and a large sibling group, including drawing-state variants. The results matched.
This removes scans of unrelated nodes. A single large sibling group can still require quadratic filtering; the PR does not claim linear behavior or a measured browser rendering improvement. GitHub’s test workflow is awaiting repository approval.
Summary by CodeRabbit
Bug Fixes
Improved consistency of thread branch connections when a thread is displayed alongside many unrelated nodes.
Tests
Added coverage to verify that reply and continuation connections remain consistent as unrelated nodes are added.
Review was skipped as selected files did not have any reviewable changes.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 59b5b4dd-7684-47f0-8e26-58b0a6857856
Commits
Reviewing files that changed from the base of the PR and between b8df0f6 and 2c15b1d.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
graphEdges groups nodes by parent and predecessor before building branch edges. The branch logic uses these groups to find successors and earlier replies. A regression test checks that adding 200 unrelated nodes does not change the thread’s reply and continuation edge IDs or paths.
graphEdges groups nodes by parent and predecessor, then uses those groups to find branch successors and earlier replies. A regression test checks edge IDs and paths with 200 unrelated nodes added.
dev-null-sh/dev-null.sh#1226: This PR changes the same graphEdges branch-edge lookups using a different indexing approach.
Suggested reviewers:jubianchi
Merge Risk: Minimal · previous review b8df0
The change is mergeable; focused source comparison found no behavior change beyond the intended lookup optimization.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names a performance change: graph parent and successor relationships are now indexed before reply paths are built. The raw summary confirms that graphEdges groups nodes by parent and after o…
Docstring Coverage
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names a performance change: graph parent and successor relationships are now indexed before reply paths are built. The raw summary confirms that graphEdges groups nodes by parent and after once, then uses those groups to find successors and earlier replies. The title is specific and matches the main change, so it passes.
Full details: Docstring Coverage
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
CodeRabbit Verify
Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 41adfc30-debe-4949-b80c-bbd0011d957e
Commits
Reviewing files that changed from the base of the PR and between c934501 and b8df0f6.
Files selected for processing: 2
resources/js/lib/graph.ts
tests/Unit/GraphEdges.test.ts
Limit details: You’ve used all 10 included reviews currently available.
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
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.
Building reply paths repeatedly searches every measured graph node for a parent’s replies and continuation. This groups those relationships once, so each lookup scans the matching nodes in their original order.
All 33 graph-edge tests passed, along with TypeScript checks and the build. I also compared complete edge results with the original implementation for small graphs, many unrelated threads, and a large sibling group, including drawing-state variants. The results matched.
This removes scans of unrelated nodes. A single large sibling group can still require quadratic filtering; the PR does not claim linear behavior or a measured browser rendering improvement. GitHub’s test workflow is awaiting repository approval.
Summary by CodeRabbit