← 输入框|github.com|刷新
Skip to content

[web-console] Don't autoexpand circuit diagram nodes on load - #7902

Merged
Karakatiza666 merged 1 commit into
mainfrom
dont-autoexpand
Nov 10, 2026
Merged

Karakatiza666 merged 1 commit into
mainfrom
dont-autoexpand

Conversation

@Karakatiza666

Copy link
Copy Markdown
Contributor

I removed the code that auto-expands the small circuit diagram regions. Multiple tests needed an update - they were dependent on whether or not the nodes are expanded after loading.

Describe Manual Test Plan

Checklist

  • Unit tests added/updated
  • Integration tests added/updated
  • Documentation updated
  • Changelog updated

Breaking Changes?

Mark if you think the answer is yes for any of these components:

Describe Incompatible Changes

@mythical-fred-oss

Copy link
Copy Markdown
Contributor

Review of PR #7902: don't auto-expand circuit diagram regions on load

What I ran

Check Result
bun run test-unit in profiler-layout (unit, component and browser) ✅ 25 files, 260 tests
Changed diagram* browser tests, run 3× ✅ stable
vitest --run in profiler-lib ⚠️ 2 failures in viewport.test.ts (zoom 1 vs 0.9375). These are unrelated: they also fail with selection.ts reverted
pre-commit run on the changed files ✅

Findings

  • missing (medium): docs are now wrong. docs.feldera.com/docs/operations/visualizing-profiles.md:202 still says "A small pipeline opens with all its regions expanded." After this PR, every region opens collapsed. Please update or remove that sentence, and check that the screenshots in that section still match. This is the docs gate for user-visible changes.
  • missing (low-medium): the commit message has no body. It contains only Signed-off-by, so it doesn't explain why the auto-expand was removed for circuits under 100 nodes (UX feedback? layout cost?). The same reason belongs in the PR's empty "Manual Test Plan".
  • Test coverage: adequate. The updated layout tests assert the collapsed initial state on small circuits, and large circuits keep the old behaviour. A direct CircuitSelector unit test in profiler-lib, checking that select().regionsExpanded starts empty, would pin this down without a browser. That's optional.

Apart from the docs fix, the code change looks good.

@mihaibudiu mihaibudiu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These tests were making too many assumptions about the shape of the circuit shown. There should not be 9 test changes for a 1-line policy change.

@mihaibudiu

Copy link
Copy Markdown
Contributor

Fixes #7197

@Karakatiza666

Copy link
Copy Markdown
Contributor Author

These tests were making too many assumptions

Well, if each test ensured a certain state of a node when initializing that would just be more complexity for the test setup. Hopefully this does not change often, so I think the initial state of a node is reasonable to rely on and just assume.

Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
@Karakatiza666
Karakatiza666 added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit 913492e Nov 10, 2026
1 check passed
@Karakatiza666
Karakatiza666 deleted the dont-autoexpand branch November 10, 2026 16:34
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.

2 participants