Skip to content

Integrate Codex autonomous sprint work#70

Merged
tig merged 5 commits into
developfrom
experiment/codex/develop
May 11, 2026
Merged

Integrate Codex autonomous sprint work#70
tig merged 5 commits into
developfrom
experiment/codex/develop

Conversation

@tig

@tig tig commented May 11, 2026

Copy link
Copy Markdown
Member

Summary

This is the final integration PR for the Codex autonomous sprint branch.

Integrated feature PRs already merged into experiment/codex/develop:

Also includes specs/runs/codex-final.md with the sprint report and benchmark notes.

Completed specs in this PR

  • drawing-overhaul
  • caret-anchors
  • read-only

Still not complete from specs/plan.md

Ready but not done: folding, search, indentation, syntax-highlighting, word-wrap, multi-caret, clipboard.

Blocked follow-on work: find-and-replace (needs search), word-wrap-toggle (needs word-wrap), folding-ui (needs folding), auto-indent (needs indentation), syntax-colorizer (needs syntax-highlighting), textmate-grammars (needs syntax-colorizer).

Validation

  • dotnet build Terminal.Gui.Text.slnx - passed
  • dotnet run --project tests/Terminal.Gui.Text.Tests - 212 passed
  • dotnet run --project tests/Terminal.Gui.Editor.Tests - 78 passed
  • dotnet run --project tests/Terminal.Gui.Editor.IntegrationTests - 105 passed
  • dotnet format Terminal.Gui.Text.slnx --exclude third_party/ - passed
  • dotnet format Terminal.Gui.Text.slnx --verify-no-changes --exclude third_party/ - passed
  • dotnet jb cleanupcode Terminal.Gui.Text.slnx --profile="Full Cleanup" - blocked because the profile is not defined
  • dotnet jb cleanupcode Terminal.Gui.Text.slnx - reported no items to cleanup (tool exited 3)

Benchmarks

./benchmarks/compare-baseline.sh currently does not produce results because it passes --job ShortRun, which BenchmarkDotNet rejects. I manually reran the same focused filter with --job short:

dotnet run --project benchmarks/Terminal.Gui.Editor.Benchmarks -c Release -- --filter "*VisualLineBuild*" --job short --exporters json

Visual-line results vs benchmarks/baseline.json:

Benchmark Baseline Current Ratio
Short ASCII 2.6 us 3.445 us 1.33x
Long ASCII 15.7 us 17.736 us 1.13x
Tabs 3.0 us 3.296 us 1.10x
Emoji / ZWJ 2.7 us 2.910 us 1.08x
Mixed tabs/CJK/emoji 2.6 us 2.820 us 1.08x

All are below the repo's 3x regression threshold.

@tig
tig marked this pull request as ready for review May 11, 2026 23:36
@tig
tig merged commit 4484444 into develop May 11, 2026
6 checks passed
@tig
tig deleted the experiment/codex/develop branch May 11, 2026 23:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a5f3ba61f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +296 to +298
anchor.MovementType = anchor.Offset <= CaretOffset
? AnchorMovementType.AfterInsertion
: AnchorMovementType.BeforeInsertion;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve selection end on boundary inserts regardless direction

RefreshSelectionAnchorMovement() sets the selection anchor to AfterInsertion whenever anchor.Offset <= CaretOffset, while the caret anchor is always AfterInsertion. With a forward selection, an insertion exactly at SelectionEnd (e.g., from another Editor sharing the same TextDocument) moves the caret boundary forward and expands the selection to include newly inserted text; the same edit on a backward selection does not. This makes selection tracking depend on selection direction and produces inconsistent results for shared-document edits.

Useful? React with 👍 / 👎.

Comment on lines +307 to +311
if (current != _lastKnownCaretOffset)
{
_lastKnownCaretOffset = current;
_virtualCaretColumn = GetCaretColumn ();
CaretChanged?.Invoke (this, EventArgs.Empty);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recompute virtual caret column after same-length text edits

In OnDocumentChanged, _virtualCaretColumn is only refreshed when CaretOffset changed. For replacements before/at the caret with equal removal/insertion length, the offset can stay identical while the visual column changes (for example, tab/space substitutions). Because MoveCaretVertically() relies on _virtualCaretColumn, subsequent Up/Down navigation can jump to the wrong target column after such edits.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant