Repository navigation
Conversation
Co-Authored-By: GitHub Copilot unknown (unknown) <223556219+Copilot@users.noreply.github.com> Co-authored-by: BayuAri <8419585+BayuAri@users.noreply.github.com>
Preview Deployment · Oct 21, 2026, 2:47 AM UTC · e3cecb0 |
…ming attributes Co-Authored-By: GitHub Copilot unknown (unknown) <223556219+Copilot@users.noreply.github.com> Co-authored-by: BayuAri <8419585+BayuAri@users.noreply.github.com>
|
@copilot Please rework this PR according to the plan below. It replaces the current approach of a fixed list of 33 commands, which still let QA Issues B–E (comments above) through. Push the changes to this PR branch. PR #6056 — Metaprogramming attributes are read-onlyProblemPR #6056 blocks a hand-picked list of 33 commands via Decisions (confirmed with user)
Allowed on attributes (
|
…and gate Replaces the per-command isAttributeSelected checks with canExecuteCommand, which disables every command on an attribute or a thought inside one unless it sets allowOnAttribute. The editable is not contenteditable inside an attribute, typing or a single-line paste cannot create an attribute, and drag-and-drop and the pickers are blocked. Co-Authored-By: GitHub Copilot unknown (unknown) <223556219+Copilot@users.noreply.github.com> Co-authored-by: BayuAri <8419585+BayuAri@users.noreply.github.com>
Reworked in 340fafc. Attributes are now read-only behind a deny-by-default gate ( Three places where I departed from the plan or it had side effects:
|
🖼️ Puppeteer snapshot diffs@copilot: These snapshot tests failed, which indicates a visual regression. Please review your changes. 1 broken snapshot
If the visual changes are intentional, update the snapshots for the affected test files: |
|||||||||
🤖 Copilot conflict resolutionMerge conflicts resolved. The most recent task was this one. Task 1 of 6. Started by Copilot Conflict Resolution. |
…amming-bold-crash # Conflicts: # docs/drag-and-drop.md # src/hooks/useDragAndDropSubThought.tsx # src/hooks/useDragAndDropThought.tsx Co-authored-by: raineorshine <750276+raineorshine@users.noreply.github.com>
BayuAri
left a comment
There was a problem hiding this comment.
Test cases
- Issue A: Metaprogramming attributes accept formatting and layout commands, and reapplying Bold crashes
- Issue B: Outdent is active on Meta Programming
- Issue C: Applying text color onto Metaprogramming
- Issue D: Favorite button is active on Metaprogramming
- Issue E: Clear Thought Command is active on Metaprogramming
- Issue F: Meta programming children accepts indented thought
@copilot
Please address Issue F and resolve the code conflict
…amming-bold-crash # Conflicts: # docs/commands.md Co-authored-by: BayuAri <8419585+BayuAri@users.noreply.github.com>
Co-Authored-By: GitHub Copilot <223556219+Copilot@users.noreply.github.com>
Issue F is fixed in e3cecb0, and the merge conflict with
Each case has a regression test in |
BayuAri
left a comment
There was a problem hiding this comment.
Test cases
- Issue A: Metaprogramming attributes accept formatting and layout commands, and reapplying Bold crashes
- Issue B: Outdent is active on Meta Programming
- Issue C: Applying text color onto Metaprogramming
- Issue D: Favorite button is active on Metaprogramming
- Issue E: Clear Thought Command is active on Metaprogramming
- Issue F: Meta programming children accepts indented thought
- Metaprogramming attributes are read-only
This includes adding restriction to manual typing=followed by alphanumeric entry
|
@raineorshine
|
|
The agent apparently wants to disable editing of metaprogramming attributes, but that is not desirable. They were designed to be editable just like any other thought when hidden thoughts are visible. Instead of stopping the user from modifying attributes, it should just fall back gracefully. An invalid attribute does nothing at all. As for the invalid thoughtId error, that is connected to a performance shortcut that exists for O(1) lookup or child attributes by name. However, it is not enforceable at the db level so it probably needs a deeper rethink. Preventing the error without making deeper changes is recommended in the short term. |
We don't want to go this far and disable commands on metaprogramming attributes. We should just fix errors and ignore attributes that become invalid. e.g. The only way a user could create It's like HTML itself. If you mistype HTML, it doesn't throw an error. It just looks funny. It's more forgiving than full programming languages that can't run at all if there is a stray semicolon. Not that we humans have to worry about typing semicolons anymore. Perhaps we'll write up a spec for metaprogramming attributes so agents can understand them and directly manipulate things like |









With the cursor on a metaprogramming attribute such as
=favorite, Bold turned the value into<b>=favorite</b>, and a second Bold threwInvalid path … No thought found with id …. Every command that formats, lays out, or restructures the cursor thought had the same exposure, including Swap Parent and Swap Note.Change
New selector:
isAttributeSelected(state, filter?). True when anyselectedPathsentry is an attribute. It usessome, so a multiselect that includes an attribute disables the command outright.canExecuteon 33 commands. Each adds&& !isAttributeSelected(state):Sort, Sort Picker, and Bullet Style had no
canExecutebefore. With no cursor their behaviour is unchanged, becauseselectedPathsis empty.preventDefault: trueon Bold, Italic, and Underline. A disabled shortcut otherwise fell through to the browser's own contenteditable Cmd/Ctrl+B/I/U, which formatted a selected=favoriteand hit the same crash. Text Color already set this flag.Tests
metaprogrammingAttributes.tsis table-driven over all 33 commands. Each runs on a normal thought, not on an attribute, and not on a multiselect that contains one.bold.tsadds a regression test for the issue's steps.Docs
commands.mdadds the attribute rule to thecanExecutecontract and updates the Generate Thought target description.metaprogramming.mdnotes which commands are disabled on attributes.Not addressed
editThought. The parent's value-keyedchildrenMapis rebuilt only when the new value is an attribute, so<b>=favorite</b>leaves the'=favorite'key in place. Un-formatting then finds the edited thought as its own duplicate, deletes it, and callssetCursoron the deleted path. With these commands disabled, nothing should format an attribute any more, but the reducer remains fragile.