Repository navigation
Conversation
The tab listed every code diagnostic as a red error, so a note such as a distribution shared between output attributes read as a problem that blocks a run. Each row now takes the colour of its severity, and an entity's heading counts its errors, warnings and notes apart. A hint is listed as a note. Code and Composition groups share one helper for the count text, which replaces `count-of.ts`.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
The diagnostics indicator counted every code diagnostic, so a net whose only diagnostics were notes showed the warning state. It now counts the errors and warnings of code and composition, and keeps the red state for errors that stop a run. The severity of a code diagnostic moves to the editor's shared folder, where the bottom bar and the Diagnostics tab both read it.
PR SummaryLow Risk Overview The bottom bar issue count includes errors and warnings only—notes are omitted so nets with only informational diagnostics show the green check. Red status still reflects blocking errors; non-blocking code errors (such as visualizer errors) count toward the number but keep an amber indicator. Shared Reviewed by Cursor Bugbot for commit 966d5c0. Bugbot is set up for automated code reviews on this repo. Configure here. |
PR overviewNo security issues were found in this pull request. Reviews
|
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues were found in the reviewed changes.
No open issues 🎉
What changed in this PR
Updates Petrinaut’s diagnostics display to distinguish errors, warnings, and notes without presenting note-only nets as broken.
Changes:
- Applies severity-specific row colours and separate heading counts.
- Excludes notes from the bottom-bar count while preserving blocking-error status.
- Adds shared helpers, regression tests, documentation, and a patch changeset.
| File | Description |
|---|---|
libs/@hashintel/petrinaut/src/ui/views/Editor/shared/diagnostic-severity.ts |
Normalizes diagnostic severity. |
libs/@hashintel/petrinaut/src/ui/views/Editor/shared/diagnostic-severity.test.ts |
Tests severity mapping and defaults. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics/styles.ts |
Removes fixed red row styling. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics/severity-counts.ts |
Shares severity counting and labels. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics/severity-counts.test.ts |
Tests counts and heading wording. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics/group-diagnostics.ts |
Counts each entity’s diagnostics by severity. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics/group-diagnostics.test.ts |
Tests mixed-severity entity counts. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics/count-of.ts |
Removes the standalone pluralization helper. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics/composition-diagnostics.tsx |
Uses shared severity-count helpers. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics.tsx |
Renders severity-aware rows and headings. |
libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/diagnostics-indicator.tsx |
Excludes notes from issue counts. |
libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/diagnostics-indicator.test.tsx |
Tests counts, status, and animation continuity. |
libs/@hashintel/petrinaut/docs/petri-net-extensions.md |
Documents severity and indicator behavior. |
.changeset/diagnostics-tab-severity.md |
Records the patch release change. |
Review effort: Balanced
Summary
Before this PR, the Diagnostics tab listed every code diagnostic as an error. A note or a warning from the code checker got a red row, and its entity's heading counted it as an error. The bottom bar counted notes as issues. A net with only notes read as broken, although it runs.
Each row now takes the colour of its severity, and a heading counts errors, warnings and notes apart. A heading's count is red only when its entity has an error. The bottom bar counts errors and warnings, so a net with only notes shows the green check.
Before
After
Links
Changes
severityOfDiagnosticsits in the editor's shared folderTest coverage
diagnostic-severity.test.ts:group-diagnostics.test.ts:diagnostics-indicator.test.tsx:severity-counts.test.ts:How to test
LaunchSatelliteconst spare = 1;as first line of Transition Results codeconst spare = Math.random();const spare = missing;