feat: Add node completion status feature#14
Open
DisciplinedSoftware wants to merge 25 commits intoOlegIGalkin:mainfrom
Open
feat: Add node completion status feature#14DisciplinedSoftware wants to merge 25 commits intoOlegIGalkin:mainfrom
DisciplinedSoftware wants to merge 25 commits intoOlegIGalkin:mainfrom
Conversation
Author
There was a problem hiding this comment.
Pull request overview
This PR introduces a “node completion status” capability in both the VS Code and Visual Studio extensions by persisting a per-node status value and rendering it in the MindElixir diagram UI.
Changes:
- Adds per-node status state (e.g., via
node.data.status) and corresponding visual styling/icons in the embedded MindElixir HTML/JS. - Adds keyboard handling and context-menu actions to set/clear/cycle status and triggers auto-save on status changes.
- Updates the Visual Studio-side data model to carry status alongside existing node metadata.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| VS Code/src/extension.ts | Webview HTML/JS updates: status CSS, context menu entries, key handler for status changes, and autosave trigger on status updates. |
| Visual Studio/CodeMindMap/CodeMindMapHtml.cs | Embedded HTML/JS updates mirroring the VS Code implementation (status CSS, context menu, keyboard cycling, autosave trigger). |
| Visual Studio/CodeMindMap/MindMap/NodeData.cs | Extends node metadata model with a Status field to carry status through message deserialization. |
Files not reviewed (1)
- VS Code/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Scope padding-left to level-2+ nodes (me-children me-parent me-tpc) to avoid widening root/level-1 nodes and breaking branch lines - Call mind.linkDiv() after applying statuses to keep lines correctly drawn - Remove opacity on completed nodes; keep only text-decoration: line-through Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Scale root node padding from 10px/30px to 14px/45px to match the same padding-to-font ratio as level-1 nodes (0.57v / 1.79h). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Root node (45px left padding): icon at left 16px = (45-14)/2 - Level-1 nodes (25px left padding): icon at left 6px = (25-14)/2 - Level-2+ nodes keep left 2px within their added 20px padding Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Target me-tpc > .text directly since MindElixir wraps text in an inline-block span that does not inherit text-decoration reliably. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Queue importMindMapData if it arrives before mind is initialized, apply it right after mind.init() instead of silently dropping it - Add 500ms retry in scheduleApplyAllStatuses to catch slow renders Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Always apply padding-left: 20px on me-children me-parent me-tpc regardless of status, so text position never moves when a status icon is added or removed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace timeout-based retries with a debounced linkDiv bus listener. MindElixir fires linkDiv after every layout pass; waiting 50ms after the last one guarantees applyAllStatuses runs after the final DOM state, regardless of how many render passes MindElixir performs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Post mindMapOperation after toggling status with C key so the existing autosave handler fires immediately. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Status cycle is now: (none) -> in-progress -> completed -> (none). Nodes with no status have no status property stored. The not-started value is removed entirely since the feature was never released. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The class was never referenced in any CSS rule; only data-status attribute is used for styling. Simplify updateNodeStatus accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Skip status toggle when the inline node editor (input-box) is open so typing 'c' in a node label works correctly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extend the MindElixir context menu with three status actions: In Progress, Completed, and Clear Status. Each updates the node visual and triggers autosave. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
MindElixir's extend API does not auto-close the menu unlike built-in items, so explicitly hide .context-menu after each status selection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Use optional chaining on context menu querySelector to avoid potential null dereference - Cancel pending RAF/timeout handles in scheduleApplyAllStatuses before scheduling new ones to avoid redundant applyAllStatuses calls - Fix stale CSS comment: 30px -> 45px horizontal padding on root node Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove leftover dev-badge CSS and HTML element from toolbar - Add v1.20 entry to README documenting node completion status feature - Bump version from 1.19.0 to 1.20.0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previous commit accidentally rewrote the entire lockfile (stripping license fields) due to npm regenerating it. Restore from main and only update the version numbers to 1.20.0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Status has no default; valid values are in-progress and completed only. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- updateNodeStatus: default status to null instead of not-started - Status cycle: align with VS Code extension ((none) → in-progress → completed → (none)) - New node creation: remove status field entirely instead of defaulting to not-started Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
scheduleRafHandle and scheduleTimerHandle were declared with let inside initMindMap() after the first call to scheduleApplyAllStatuses(), putting them in the temporal dead zone and throwing a ReferenceError that silently crashed initMindMap(). Moved declarations to module-level with the other shared state variables. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
document.querySelector(...)?.hidden = true is invalid JS — optional chaining cannot appear on the left-hand side of an assignment. Replaced with an explicit null check: const cm = ...; if (cm) cm.hidden = true. This was causing a silent script parse error that prevented the entire webview from initializing, so no diagram was rendered. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace class-based status approach with data-status attribute - Add CSS icons (::before) with correct positioning per node level - Add applyAllStatuses() + debounced linkDiv listener for load/refresh - Add context menu items (In Progress, Completed, Clear Status) - Add input-box guard to c key handler - Trigger autosave on status change via c key and context menu - Move status tutorial node inside Mind Map group, update descriptions - scheduleApplyAllStatuses() called on selectNode and operation events Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9656801 to
15d1535
Compare
This was referenced Mar 24, 2026
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.

Overview
This PR adds node completion status functionality to both VS Code and Visual Studio extensions. Nodes can now be marked as completed or incomplete using keyboard shortcuts and context menu options.
Features
Changes
Testing
The changes have been tested to ensure: