Editor handle v2: class-aware validation, selection/validation API, themes, round-360, shortcuts - #11
Merged
Merged
Conversation
…ses[0] fallback validateModel(model, manifest, className?) — the optional third arg selects the manifest device class to validate against; omitted or unknown names fall back to manifest.classes[0] (historical two-arg behavior unchanged). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Status bar, save gate, usePreview and SourceEditor now validate against the
class the user actually selected (SourceEditor gains an optional className
prop), so '✓ Valid for {class}' agrees with what was validated.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…torHandle getSelection() exposes the selected grid cell + its element id (nulls when nothing/empty selected). getValidationIssues() merges validateModel (source 'manifest') with lintDeviceCapabilities for the selected class (source 'device-lint', drop->error, degrade->warning), returning [] until the manifest loads. New ValidationIssue type exported from the editor barrel. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ion parsing SUPPORTED_CLASSES gains round-360; getDeviceDimensions (now exported) parses round-N as N x N. Non-manifest classes stay gated behind the existing isClassSupported '(preview unsupported)' treatment. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
red-night is night-vision-safe (true-black ground, red-only inks, no blue/green bleed; semantic pairs split on brightness); classic is a cream/brass analog-instrument look. theme() resolves both; THEMES now declares five themes with full Theme + WidgetColors coverage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tte entry The preview-theme selector now lists all five renderer themes (night, day, high-contrast, red-night, classic); Palette gains a curated clinometer TYPE_META entry (label, description, heel-arc icon) instead of the generic fallback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ect, Cmd/Ctrl+S save Window keydown listener with a typing focus guard (inputs, textareas, selects, contenteditable — covers the source-mode editor) so Delete while editing text never removes a widget; Cmd/Ctrl+S preventDefaults the browser save dialog and runs the normal save path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…chat context (M-2) The Builder reported a hardcoded targetClass to the bundle while getValidationIssues() validated against the LIVE class switcher selection, so ctx.targetClass and ctx.validationIssues could disagree after a class switch. Expose the live className through the handle so callers source both from the same state. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ixes CI red since MIDL-3) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Editor-side half of the webshell editor↔chat integration (consumed by yey-boats/navigator via the vendor/midl submodule):
classes[0]; the status bar claimed otherwise). All internal callers (save gate, status bar, preview, source editor) now pass the live class.getSelection(),getValidationIssues()(manifest + device-lint, correct class),getTargetClass()— powers the chat panel's per-turn editor context.round-Ndimension parsing.Test plan
make gen-manifestbyte-identical,make check-catalogpassMerge note: please merge with a merge commit or rebase (not squash) — the navigator PR pins the submodule to
ebb7bd3; a squash would strand the pin.🤖 Generated with Claude Code