docs(ai-primer): document four high-value v2 gotchas agents miss - #5530
Merged
Merged
Conversation
Add to ai-v2-primer.md 'Gotchas > API Correctness' (verified against source): - Dialog/MessageBox: the last button added is the default; order Cancel…OK; don't hand-set IsDefault (Dialog.cs, MessageBox.cs). - AddCommand is protected — register inside the View, bind via KeyBindings (View.Command.cs). - Terminal.Gui.Drawing.Attribute collides with System.Attribute (Drawing/Attribute.cs). - Typed views expose .Value via IValue<T>, not guessed names like .Date/.Color (DatePicker.cs). Inline prose only (no fenced snippets), so the doc-snippet compiler is unaffected. Part of #5525. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 25, 2026
This was referenced Jul 6, 2026
This was referenced Jul 13, 2026
This was referenced Jul 20, 2026
This was referenced Aug 3, 2026
This was referenced Aug 17, 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.
First, safe slice of #5525. Adds the verified, high-frequency gotchas to
ai-v2-primer.md's Gotchas → API Correctness list — the ones agents get wrong even once they know it's v2, and which the primer didn't cover:Cancel … OK; don't hand-setIsDefault. (Views/Dialog.cs,Views/MessageBox.cs)AddCommandisprotected— register inside the View, bind viaKeyBindings. (ViewBase/View.Command.cs)Terminal.Gui.Drawing.Attributecollides withSystem.Attribute. (Drawing/Attribute.cs).ValueviaIValue<T>, not.Date/.Color. (Views/DatePicker.cs)All inline prose (no fenced snippets), so
validate-doc-snippetsis unaffected. Each verified against currentdevelopsource.Remaining #5525 items — flagged for a maintainer call (not in this PR)
These are contentious or cross-file, so they want your decision rather than a unilateral edit:
AcceptedvsAccepting: the primer says "Accepted for side effects, Accepting to cancel," but liveUICatalogscenarios useAcceptingfor side effects ~139:10, andgetting-started.mdsays event handling "usesAccepting." Pick one and make the docs + examples agree (thenvalidate-doc-snippetscan enforce it).llms.txtmodel manualIsDefault = trueand obsoleteSelectedItemChanged— update to match gotchas There is a problem with the high-intensity colors, they are not showing up #1/Add mouse event support to the core. #4 above.@2.0.*vsalpha.*vsbeta.*; "Alpha" vs "Beta") now that v2 is stable 2.4.x.llms.txt(and the dialog/IValuesnippets) tovalidate-doc-snippets.ymlso they can't rot.Sourced while building the agent-optimized templates (tui-cs/Terminal.Gui.templates#22).