Repository navigation
v0.1.102: diagram tool — flow/ER/system from a text DSL, AI-assisted - #14
Merged
Merged
Conversation
… browser-native export
A new first-class diagramming surface (Full flavor): the .npd text DSL is the
source of truth and the canvas is a live projection of it. Create via AI Generate
(describe it in English -> review the generated .npd -> Insert), Flow/ER/System
templates, or by writing .npd directly; Import Mermaid too. Opens from a toolbar
button next to Noter, with an in-tool Help cheat-sheet.
Added
-----
* src/diagram/{npd_parser,mermaid_import,diagram_view,diagram_editor,diagram_ai_dialog}.{h,cpp} — pure .npd parser + Mermaid translator, WebEngine canvas host (+ Lite stub), split editor tab, AI generate dialog with review-before-insert
* resources/diagram/ — dagre auto-layout render layer + diagram.html + 12 icons (qrc-bundled, Full)
* src/mainwindow.cpp, src/tool_colors.cpp — Diagram toolbar button (next to Noter), indigo accent, painted flowchart glyph
* npd_render.cpp — offscreen .npd -> image CLI; samples/diagram_showcase.npd
* test_npd_parser (61) / test_mermaid_import (25) / test_diagram_view (10)
Fixed
-----
* CMakeLists.txt — set(CMAKE_AUTORCC ON); .qrc files in target sources (vega.qrc inline charts, icons.qrc, diagram.qrc) now actually compile into the binary
Docs
----
* docs/docs.html, docs/index.html, README.md — detailed diagram docs, prominent feature card + flagship v0.1.102 version card; bare-binary stat 9.7 MB -> ~11.5 MB (the diagram authoring UI lands in Lite too; only the WebEngine renderer is Full-only)
* scripts/stale-text-check.sh — pattern-based historical-row exclusion (replaces a hardcoded line range that drifted when the v0.1.102 row landed)
Lite 48/48 + Full 50/50 ctest, both flavors boot clean, diagram renders 10/10.
Stale-text-check clean across every surface.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
singhpratech
pushed a commit
that referenced
this pull request
Jun 7, 2026
…-noter-segfault) The v0.1.113 Noter A-grade test additions drive static/constructed QMessageBox modals that SIGSEGV inside Qt's "offscreen" QPA plugin on Windows — confirmed by CI run 27084261134: test_notes_panels #13 at the static QMessageBox::warning (notes.cpp:3517, backend-down) and test_notes_panel_widget #14 §22b at the static QMessageBox::information (notes.cpp:3676, switched-note), the latter on a stack with zero network/teardown state — so it is the static helper's own modal loop the offscreen plugin chokes on, not a UAF. By Qt internals QMessageBox:: warning/information() themselves build a stack QMessageBox and exec() it, so the constructed-instance form is the same crash class; the real fault line is QMessageBox(any) vs plain QDialog::exec() (the §22 NoterSweepDialog passes). Both tests pass on Linux Debug, Debug+ASan (no memory error) AND Release — the crash is exclusive to QT_QPA_PLATFORM=offscreen on Windows, a CI-harness-only configuration. The SHIPPED binary uses the real Windows platform plugin where these confirmations render fine (used throughout Notepatra, shipped for many releases) — so this is never a user crash; the binary is unchanged. Add winOffscreenModalUnsafe() (Q_OS_WIN && platformName()=="offscreen") and gate every QMessageBox modal DRIVE behind it with a loud [SKIP] (never silent): #13 backend-down, and §22b/§29/§29b/§50/§54/§57 in the widget test. The refusal / confirm BEHAVIOURS are platform-independent logic and stay fully covered on Linux Debug/ASan/Release. Guards are no-ops off Windows — full local suite still 54/54 green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
singhpratech
pushed a commit
that referenced
this pull request
Jun 7, 2026
…ter-segfault follow-up) With the QMessageBox segfault guards in place, test_notes_panel_widget runs past §22b on Windows for the first time — exposing 3 sections (§27 failed-save hint, §28b unreadable-file state, §36 failed-rename) that INDUCE a failure via QFile::setPermissions() read-only. Windows ignores the read-only attribute on directories and an admin owner (the CI runner) bypasses file ACLs, so the save/read/rename SUCCEEDS and the failure-handling assertions become vacuous — all 12 of these EXPECTs failed on the PR #20 Windows run (the segfaults themselves are now GONE: #13 passes, #14 ran to completion). These never ran on Windows before (the binary crashed at §22b), so this is a latent POSIX-only test limitation, not a product or regression bug — on Windows the save genuinely succeeds and the product correctly shows "auto-saved". Add winReadOnlyUnenforced() (Q_OS_WIN) and gate the injection behind it with a loud [SKIP]: §27 (whole), §28 part (b) only (the missing-file case (a) still runs on Windows), §36 (whole). The failure-handling BEHAVIOURS stay fully covered on Linux Debug/ASan/Release. Guards are no-ops off Windows — full local suite still 54/54 green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
New first-class diagram tool (Full flavor): the
.npdtext DSL is the source of truth, the canvas is a live projection. Create via AI Generate (describe → review → insert), Flow/ER/System templates, or by writing.npd; Import Mermaid too. Toolbar button next to Noter + in-tool Help.Also fixes a latent
CMAKE_AUTORCCgap —.qrcresources (vega inline charts, icons, the diagram layer) now actually bundle in Full builds.Verification (local)
This PR exists to get the cross-platform Full build (macOS/Windows) green before merge — that's the path I can't verify locally.
🤖 Generated with Claude Code