Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
a8aba90
Add AI agent validation checklists and formatting rules
tig Jan 23, 2026
b9a0b4d
Add clean code review task for creating clean git histories
tig Jan 23, 2026
978102e
Add command propagation plan document
tig Jan 23, 2026
ab5bb34
Add PropagatedCommands infrastructure with WeakReference support
tig Jan 23, 2026
fcc3f13
Add ShortcutTest example application
tig Jan 23, 2026
1a5b29e
Add comprehensive command propagation tests
tig Jan 23, 2026
b1095aa
Update documentation for command propagation
tig Jan 23, 2026
971337e
Update UICatalog scenarios for WeakReference changes
tig Jan 23, 2026
4d66769
Fix ShortcutTest project path in solution file
tig Jan 23, 2026
29282bf
cleanup
tig Jan 23, 2026
535ba0f
Improve Shortcut event propagation and add tests
tig Jan 23, 2026
185a381
Merge branch 'v2_develop' into copilot/fix-command-propagation-issue-…
tig Jan 24, 2026
86ce9e2
Merge branch 'v2_develop' into copilot/fix-command-propagation-issue-…
tig Jan 25, 2026
ae8273d
Merge branch 'v2_develop' into copilot/fix-command-propagation-issue-…
tig Jan 26, 2026
948aadc
Merge branch 'v2_develop' into copilot/fix-command-propagation-issue-…
tig Jan 26, 2026
8bee854
Improve null safety and event handling in Shortcut & ComboBox
tig Jan 26, 2026
3e1945d
Refactor Shortcut to use auto-properties with initializers
tig Jan 26, 2026
e20c0e6
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Jan 26, 2026
5cdcb91
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Jan 27, 2026
979d400
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Jan 27, 2026
5140947
WIP - Refactoring Shortcut->MenuItem etc...
tig Jan 28, 2026
1cc2b3e
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Jan 28, 2026
33cb9dc
Merged and fixed
tig Jan 28, 2026
c5ef73f
Merged
tig Jan 28, 2026
7c24538
Enabled VSCode debugging of UICatalog
tig Jan 29, 2026
c87e2e2
Merge branch 'v2_develop' into copilot/fix-command-propagation-issue-…
tig Feb 3, 2026
9c5459e
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 3, 2026
dbc62eb
updated command.md
tig Feb 3, 2026
e77f1d8
Refactor command propagation: use CommandsToBubbleUp
tig Feb 3, 2026
c6cc204
Update Enter key and Accept command behavior in TextView
tig Feb 3, 2026
eac3de0
Update Accept command to return null if not handled
tig Feb 3, 2026
7d71cc0
Update TextFieldTests to use Accepting event
tig Feb 3, 2026
77afc2a
Improve EventLog and command event logging details
tig Feb 3, 2026
e9b6394
Refactor Button/Shortcut event model and command handling
tig Feb 3, 2026
6549635
Refactor Dialog Accept command handling and event flow
tig Feb 4, 2026
941e28f
Merge branch 'v2_develop' into copilot/fix-command-propagation-issue-…
tig Feb 4, 2026
da72f4d
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Feb 4, 2026
bbf4121
Refactor command/event system and improve logging
tig Feb 5, 2026
636d2de
Documented
tig Feb 5, 2026
925c685
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Feb 5, 2026
d4ec320
Merge branch 'v2_develop' into copilot/fix-command-propagation-issue-…
tig Feb 5, 2026
126ee08
Fixed merge issues
tig Feb 5, 2026
bec7781
Clarify command/event handling in Button, CheckBox, Shortcut
tig Feb 6, 2026
dbefd98
updated progress
tig Feb 6, 2026
1680b33
Merge branch 'v2_develop' into copilot/fix-command-propagation-issue-…
tig Feb 6, 2026
b71a2eb
Shortcut: add deep-dive docs, tweak mouse routing, log events
tig Feb 6, 2026
ebd85bc
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 6, 2026
864654f
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Feb 6, 2026
e7b47c4
Merge branch 'v2_develop' into copilot/fix-command-propagation-issue-…
tig Feb 6, 2026
74cd535
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 6, 2026
d3e5b33
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Feb 6, 2026
089f6c9
new plan
tig Feb 6, 2026
70b1721
Merge branch 'v2_develop' into copilot/fix-command-propagation-issue-…
tig Feb 6, 2026
1af6267
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Feb 6, 2026
5bd95d3
Merge v2_develop: Take v2_develop's C# 12 extension methods (ViewExte…
tig Feb 6, 2026
16824b2
updated plan
tig Feb 6, 2026
d51719a
Fix ButtonTests: Button no longer raises Activating events
tig Feb 6, 2026
7a51021
Update ButtonTests names to reflect behavior
tig Feb 6, 2026
2e5960e
updated broken test. still broken.
tig Feb 6, 2026
d2c453b
tweaks
tig Feb 7, 2026
c13f457
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Feb 7, 2026
b3e097c
Merge branch 'v2_develop' into copilot/fix-command-propagation-issue-…
tig Feb 7, 2026
31fade3
merged v2_develop
tig Feb 7, 2026
c068342
fixed xml doc bug.
tig Feb 7, 2026
881b79d
Improve Shortcut activation source handling and docs
tig Feb 7, 2026
c804318
Refactor shortcut and progress bar handling
tig Feb 7, 2026
81e55e1
Fixed click on margin bug and added test.
tig Feb 7, 2026
802e34e
Fixed TextView Hotkey handling
tig Feb 7, 2026
71591fb
Fixed label hotkey test
tig Feb 7, 2026
7270bb3
Fixed TreeView test
tig Feb 7, 2026
09ab28a
Code cleanup
tig Feb 7, 2026
c045c88
Fixed keybaord test
tig Feb 7, 2026
710d005
combobox and treeview
tig Feb 7, 2026
a74bc5d
Refactor.
tig Feb 9, 2026
c5d123b
Renamed IInputBinding etc...
tig Feb 9, 2026
eba3d92
Robustness improvements.
tig Feb 10, 2026
ea50aa1
Selector tweaks
tig Feb 10, 2026
1a00faa
add TabBehavior to Selectors
tig Feb 10, 2026
06e3f57
Selector progress
tig Feb 10, 2026
c10c405
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 10, 2026
2522bb0
Merge branch 'copilot/fix-command-propagation-issue-clean' of https:/…
tig Feb 10, 2026
0e0e751
Refactor KeyBindings & Shortcut command/event handling
tig Feb 11, 2026
ffb4981
Add comprehensive unit tests for CommandContext and View
tig Feb 11, 2026
0599571
Refactor ListView command handling and HotKey behavior
tig Feb 11, 2026
df14224
Refactor CharMap commands, events, and AOT support
tig Feb 11, 2026
3aedd10
Fixed warnings
tig Feb 11, 2026
84b4746
Updated NumericUpDown
tig Feb 11, 2026
468b1bf
Add BubbleDown to View and simplify Shortcut command dispatch
tig Feb 12, 2026
18af155
tweaks
tig Feb 12, 2026
b167f1b
Fix Shortcut Key not activating CommandView via HotKey
tig Feb 12, 2026
0cf4c3e
cleanup
tig Feb 12, 2026
dfd7074
Add comprehensive BubbleDown tests to ViewCommandTests
tig Feb 12, 2026
2d4b895
Add Shortcut key/action tests and update BubbleDown docs
tig Feb 12, 2026
16b1a2e
SelectorBase fixed!
tig Feb 12, 2026
608ac79
Fix OptionSelector/FlagSelector HotKey command handling
tig Feb 12, 2026
8dcf60f
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 12, 2026
a453fcd
Refactor command acceptance API to use ICommandContext
tig Feb 12, 2026
c8cac9e
Fixed OptionSelector Tests
tig Feb 12, 2026
bacb3bd
WIP
tig Feb 12, 2026
383c536
Fixed NumericUpDown activating bug
tig Feb 12, 2026
8ee4633
Improve context menu and flag selector event handling
tig Feb 12, 2026
691fd50
WIP: Trying to fix final FlagSelector issues
tig Feb 12, 2026
435274f
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 12, 2026
1341752
WIP: Sruggling with command bubling and IsDefault
tig Feb 13, 2026
7adebb9
Improve Accept command bubbling and dialog event handling
tig Feb 13, 2026
9626c1d
Refine Accept command bubbling and DefaultAcceptView logic
tig Feb 14, 2026
503bcbe
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 14, 2026
a95f3d2
Improve dialog command handling and keyboard propagation
tig Feb 14, 2026
bb81618
Improve FlagSelector hotkey and activation behavior
tig Feb 14, 2026
c08de35
Refactor FlagSelector HotKey handling per spec
tig Feb 14, 2026
cba54a5
Refactor FlagSelector HotKey and "None" checkbox logic
tig Feb 14, 2026
b5318fa
test cleanup
tig Feb 14, 2026
47682b4
Fixed TreeView
tig Feb 14, 2026
c8d14a6
Cleanup
tig Feb 14, 2026
84cd3f5
Fix TextField HotKey: allow input of HotKey char when focused
tig Feb 14, 2026
91218c4
Fix Space key handling for text input in TextField/TextView
tig Feb 14, 2026
f096ae9
Updated docs
tig Feb 14, 2026
4723476
Fix Shortcut BubbleDown and separate Accept/Activate paths
tig Feb 14, 2026
3f5d245
Fix ColorPicker16 click in Shortcuts scenario and update docs
tig Feb 14, 2026
52a0533
Refactor Menu hierarchy: migrate Command/TargetView to Shortcut, fix …
tig Feb 14, 2026
84bf478
Fix MenuBar mouse click: walk SuperView chain to find MenuBarItem
tig Feb 14, 2026
716509a
Update menus-refactor plan: MenuItem click, integration tests
tig Feb 14, 2026
b6abfa5
Fix Menu command bubbling: MenuItem HotKey action, menu closing, and …
tig Feb 14, 2026
33df3d3
warnings
tig Feb 15, 2026
88d6fe6
cleanup
tig Feb 15, 2026
279d4d9
deleted plans
tig Feb 15, 2026
9ba783c
Fix TreeView Enter key: bind to Accept instead of Activate
tig Feb 15, 2026
bbf201b
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 15, 2026
d484371
removed dupe test
tig Feb 15, 2026
32681cc
Fix Release build: replace WasDisposed with SubMenu null check
tig Feb 15, 2026
fcca588
Add EnableForDesign event verification tests
tig Feb 15, 2026
2f74607
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 15, 2026
08b4c54
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 15, 2026
82a6e82
tweaked menu examples
tig Feb 15, 2026
4fbbe7a
Defer Shortcut.Activated on bubble-up
tig Feb 15, 2026
7b354ca
Fix command resource strings and Shortcut.OnActivated TargetView invo…
tig Feb 15, 2026
a2c6dc6
Remove analyzers and related test projects from solution
tig Feb 15, 2026
19bec07
Fix integration tests: update expected strings and remove fragile Sho…
tig Feb 15, 2026
91f53f1
Update command.md and command-diagrams.md for Shortcut TargetView cha…
tig Feb 15, 2026
33fa560
Code cleanup. Doc updates.
tig Feb 15, 2026
9ea1236
Refactor event logging to use new EventLog component
tig Feb 15, 2026
ad6490a
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 17, 2026
52b898e
Fix duplicate activations for Shortcut CommandView subviews
tig Feb 17, 2026
8b3fcae
Improve focus and visual roles for Shortcut CommandViews
tig Feb 17, 2026
7b0476e
Fix: Enter key now activates & accepts in OptionSelector
tig Feb 17, 2026
b5dad73
Remove manual bubbling workarounds in selectors
tig Feb 17, 2026
16389c2
Refactor subview creation in SelectorBase and FlagSelector
tig Feb 17, 2026
dd0ead4
Progress on AddCommand cleanup
tig Feb 17, 2026
0a4b8b6
code cleanup
tig Feb 17, 2026
f5c1541
Fixed tests
tig Feb 17, 2026
dab9c14
Code cleanup
tig Feb 17, 2026
72a609c
Refactor menu and bar APIs for flexibility and testability
tig Feb 18, 2026
db57b44
Bar command bubbling: clarify, document, and test behavior
tig Feb 18, 2026
7036d0b
Add plan to fix Bar command bubbling and PopoverMenu bridge
tig Feb 18, 2026
d10fef8
Fix command bubbling: clean design for Bar, Menu, Selectors
tig Feb 18, 2026
98b525f
Skip ContextMenu_OpenSubmenu integration test pending Phase 5
tig Feb 18, 2026
6eecb6a
Restore Shortcut activation logic and add bubbling tests
tig Feb 18, 2026
aac4287
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 18, 2026
18a7e44
Made agents.md compatible with codex.
tig Feb 18, 2026
ecd0263
Add command system redesign requirements and minor fix
tig Feb 19, 2026
70e73e1
Simplify command routing in composite views
tig Feb 19, 2026
6c24ddc
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 19, 2026
ce9e986
codex clean slate plan
tig Feb 19, 2026
4e13487
Synthesize command system redesign: rigorous requirements + pragmatic…
tig Feb 19, 2026
d6b38b7
deleted
tig Feb 19, 2026
f567d87
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 19, 2026
01e48e0
Merge branch 'copilot/fix-command-propagation-issue-clean' of tig:tig…
tig Feb 19, 2026
b79c981
Checkpoint from Copilot CLI for coding agent session
tig Feb 19, 2026
3da216b
Phase A complete: Foundation types (CommandOutcome, CommandRouting, i…
Copilot Feb 19, 2026
130444e
Fix all test compilation errors after Phase A changes
Copilot Feb 19, 2026
bc6a69a
Fix test: Update CommandBinding equality test for WeakReference Source
Copilot Feb 19, 2026
8910f2d
code cleanup
tig Feb 19, 2026
919d336
Merge branch 'copilot/excellent-tyrannosaurus' of tig:tig/Terminal.Gu…
tig Feb 19, 2026
74c2dbd
code cleanup
tig Feb 19, 2026
f2d2be2
Phase B: Add dispatch mechanism to View and migrate Shortcut, OptionS…
Copilot Feb 19, 2026
24d62b9
Phase B partial: Dispatch mechanism with deferred completion (9 Short…
Copilot Feb 19, 2026
d8d75ae
WIP: Relay-mode deferred completion with state tracking (23 tests sti…
Copilot Feb 19, 2026
8a9b271
Phase B: Fix relay-mode deferred completion - 126/130 Shortcut tests …
Copilot Feb 19, 2026
93fb920
Fix OptionSelector mutual exclusivity - restore OnActivating, event s…
Copilot Feb 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
245 changes: 245 additions & 0 deletions .claude/POST-GENERATION-VALIDATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
# Post-Generation Validation Checklist

**USE THIS CHECKLIST AFTER GENERATING OR MODIFYING ANY CODE.**

This is a mandatory validation step. AI agents frequently make formatting and style errors that violate Terminal.Gui conventions. Scan every line of generated code before considering the task complete.

## Part 1: Formatting Violations (MOST CRITICAL)

These are the **most commonly violated rules**. Check EVERY line:

### Space Before Parentheses ⚠️ #1 MISTAKE
```csharp
// CORRECT ✓
void MyMethod ()
int result = Calculate (x, y);
var items = GetItems ();
if (condition)
using (var obj = Create ())

// WRONG ✗ - SCAN FOR THESE
void MyMethod() // Missing space before ()
int result = Calculate(x, y);
var items = GetItems();
if(condition)
using(var obj = Create())
```

**Scan pattern:** Look for `\w(` (word character followed immediately by `(`)

### Space Before Brackets ⚠️ #2 MISTAKE
```csharp
// CORRECT ✓
var value = array [index];
var item = list [0];
MyArray [i] = value;

// WRONG ✗ - SCAN FOR THESE
var value = array[index]; // Missing space before [
var item = list[0];
MyArray[i] = value;
```

**Scan pattern:** Look for `\w[` (word character followed immediately by `[`)

### Braces on Next Line ⚠️ #3 MISTAKE
```csharp
// CORRECT ✓
void MyMethod ()
{
if (condition)
{
DoWork ();
}
}

// WRONG ✗ - SCAN FOR THESE
void MyMethod() { // Brace on same line
void MyMethod () { // Brace on same line
if (condition) { // Brace on same line
DoWork();
}
}
```

**Scan pattern:** Look for `) {` or `= {` (brace on same line)

### Blank Lines ⚠️ #4 MISTAKE
```csharp
// CORRECT ✓ - blank line BEFORE control transfer
DoWork ();

return result; // Blank line above

// CORRECT ✓ - blank line AFTER control block
if (condition)
{
DoWork ();
}

DoNext (); // Blank line above

// WRONG ✗ - SCAN FOR THESE
DoWork ();
return result; // No blank line above return

if (condition) { DoWork (); }
DoNext (); // No blank line after control block
```

**Control transfer statements:** `return`, `break`, `continue`, `throw`
**Control blocks:** `if`, `for`, `while`, `foreach`, `using`, `try`/`catch`

### Indentation
```csharp
// CORRECT ✓ - 4 spaces per level
public class MyClass
{
public void MyMethod ()
{
if (condition)
{
DoWork ();
}
}
}

// WRONG ✗ - tabs or wrong spacing
public class MyClass
{
public void MyMethod () // Tab instead of spaces
{
if (condition) // 2 spaces instead of 4
{
```

**Rule:** 4 spaces per indentation level. NO tabs.

## Part 2: Code Style Violations

### No `var` for Non-Built-In Types
```csharp
// CORRECT ✓
Label label = new () { Text = "Hello" };
List<View> views = [];
Window window = new ();
var count = 0; // OK - int is built-in
var text = "hello"; // OK - string is built-in

// WRONG ✗
var label = new Label { Text = "Hello" };
var views = new List<View>();
var window = new Window();
```

**Built-in types where var is OK:** `int`, `string`, `bool`, `double`, `float`, `decimal`, `char`, `byte`

### Target-Typed New
```csharp
// CORRECT ✓
Label label = new () { Text = "Hello" };
Window window = new ();

// WRONG ✗
Label label = new Label() { Text = "Hello" };
Window window = new Window();
```

### Collection Expressions
```csharp
// CORRECT ✓
List<string> items = ["one", "two", "three"];
AllSuggestions = ["word1", "word2", "word3"];
return [];

// WRONG ✗
List<string> items = new () { "one", "two", "three" };
AllSuggestions = new () { "word1", "word2", "word3" };
return new List<string>();
```

### Lambda Parameter Discards
```csharp
// CORRECT ✓
textField.TextChanged += (_, _) => { /* ... */ };
button.Accepting += (_, args) => ProcessArgs (args);

// WRONG ✗ - unused parameters
textField.TextChanged += (sender, e) => { /* ... */ };
textField.TextChanged += (s, prev) => { /* ... */ };
```

### Terminology
```csharp
// CORRECT ✓ - containment relationship
View superView = new ();
View subView = new ();
superView.Add (subView); // subView.SuperView == superView

// WRONG ✗ - for containment
View parent = new (); // Should be: superView
View child = new (); // Should be: subView
parent.Add (child);

// Comments:
// Add the button as a SubView of the window
// The dialog's SuperView is the application

// WRONG ✗ - in comments
// Add the button as a child of the window
// The dialog's parent is the application
```

**Use SuperView/SubView for containment.** Parent/Child only for non-containment references (rare).

## Part 3: Quick Scan Commands

Use these bash commands to catch common violations:

```bash
# Missing space before ( - most common error
grep -nE '\w\(' YourFile.cs | grep -v '//'

# Missing space before [
grep -nE '\w\[' YourFile.cs | grep -v '//'

# Brace on same line
grep -n ') {' YourFile.cs
grep -n '= {' YourFile.cs

# Var usage (manually verify each is built-in type)
grep -n '\bvar\b' YourFile.cs

# Trailing whitespace
grep -n ' $' YourFile.cs
```

## Part 4: Manual Review

After automated checks, manually review:

1. **Every method call/declaration** - space before `()`?
2. **Every array access** - space before `[]`?
3. **Every opening brace** - on next line?
4. **Every return statement** - blank line before it?
5. **Every control block** - blank line after it?

## Validation Frequency

Use this checklist:
- ✅ After generating any new class or file
- ✅ After modifying existing methods (scan modified lines)
- ✅ After completing any task that involves code generation
- ✅ Before creating a commit or pull request
- ✅ When the code "looks wrong" visually

## Why This Matters

Formatting violations:
- Create noise in code reviews
- Violate project CI/CD checks
- Make code inconsistent with the rest of Terminal.Gui
- Are the #1 complaint about AI-generated code
- Are easily preventable with this checklist

**The space-before-parentheses style is unusual compared to most C# projects, making it the most commonly violated rule.**
8 changes: 7 additions & 1 deletion .claude/REFRESH.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
5. **Unused lambda params** - use `_` discard: `(_, _) => { }`
6. **Local functions** - use camelCase: `void myLocalFunc ()`
7. **Backing fields** - place immediately before their property (ReSharper bug, must do manually)
8. **ReShaper Formatting** - run ReSharper code cleanup with "Full Cleanup" profile (not the built-in one).
8. **SPACE BEFORE PARENTHESES** - `Method ()` not `Method()`, `array [i]` not `array[i]` (see `formatting.md`)
9. **Braces on next line** - ALL opening braces on next line (Allman style)
10. **Blank lines** - before `return`/`break`/`continue`/`throw`, after control blocks

## Before Each File Edit

Expand All @@ -21,10 +23,14 @@ Ask yourself:
- [ ] Am I using collection expressions []?
- [ ] Are my lambda parameters discards if unused?
- [ ] Am I using correct terminology (SubView, not child)?
- [ ] **Did I add space BEFORE parentheses and brackets?**
- [ ] **Are ALL braces on the next line?**
- [ ] **Did I add blank lines before returns and after control blocks?**

## If Unsure

Re-read the relevant rule file in `.claude/rules/`:
- `formatting.md` - **SPACING, BRACES, BLANK LINES** (most commonly violated!)
- `type-declarations.md` - var vs explicit types
- `target-typed-new.md` - new() syntax
- `terminology.md` - SubView/SuperView terms
Expand Down
Loading