Skip to content

Add drawing comments - #316

Merged
max-sixty merged 4 commits into
mainfrom
codex/drawing-comments
Sep 5, 2026
Merged

max-sixty merged 4 commits into
mainfrom
codex/drawing-comments

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add a w draw mode whose single freehand stroke can begin on content or page whitespace, cross element boundaries, and retain the nearest semantic target when one is alongside the starting point
  • carry drawing geometry through ordinary comment drafts, event validation, replay, thread state, and agent transcripts; the drawing itself is sufficient content, so no text is required
  • keep the page as the drawing's visual context: replay the mark over the rendered content, omit the redundant target box and detached thread thumbnail, and preserve the ordinary thread label and navigation
  • preserve non-drawing interaction inside Leaf chrome and inline conversations, and ignore malformed persisted drawing geometry without losing valid draft text

Verification

  • uv run pre-commit run --all-files
  • uv run pytest tests (888 passed)
  • uv run pytest tests/test_render_drawing.py -q (21 passed)
  • browser usability pass at 1200×900 and 1440×900 in light and dark themes, with no console errors or warnings

This was written by Codex on behalf of max-sixty

# Conflicts:
#	skills/leaf/assets/runtime/composing/input.js

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Two findings, both in the same seam: the drawing layer has one draft slot and only the page path drives it explicitly.

The rest reads well. The parse_constant guard on _read_posted is the right call — minimum/maximum comparisons against NaN are both false, so a NaN coordinate would otherwise have passed the record schema; nice that the refusal is tested. The oneOf third branch (drawing without text) keeps text+token, token+drawing, and the three-way case all failing, and the dependentSchemas ban on quote/part matches what aimTargetAt can actually mint, so the browser can't produce an anchor the door refuses.

# Conflicts:
#	skills/leaf/assets/registry.json
#	skills/leaf/references/internals/events.md
@max-sixty
max-sixty merged commit 210a556 into main Sep 5, 2026
4 checks passed
@max-sixty
max-sixty deleted the codex/drawing-comments branch September 5, 2026 23:44
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.

2 participants