fix(editor): German editor review — coded hints, upload refusals and at-rest errors, translated undo ops, digest one-form, dialog wrap, first undo #268
No reviewers
Labels
No labels
bug
enhancement
needs-triage
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle!268
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/267"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the seven defects of the German-locale editor review, each with a mechanism the repository already has.
Items
apimsgcodes (hint.pageEnabledOn/Off,hint.elementEnabledOn/Off). The switch'ssettingscarriesonCode/offCodebesideon/off, thenote/noteCodepattern, andSwitchViewresolves them throughdisplayLabel.ElementForm.accessFieldsis still the one place a translation's variant is worded, and it clears the codes so the override wins.media.RejectErrorisapimsg.Coded. It answers withlibrary.uploadOversize(413,limit),library.uploadUnsupported(422,detected),library.uploadUnrecognised,library.uploadCorrupt(type) andlibrary.uploadAVIFUnavailable.error.unexpectedis no longer used for them.describenow returns language-neutral format names (SVG,GIF, …) taken from magic bytes, never from user text. Oversize has nosizearg because the handler reads at mostMaxUploadBytes+1bytes, so the real size is unknown.formDescription.errorsis now the 422's list[{field, msg, code, args}]([]element.FieldError), folded on the client bydecodeFieldErrors. The"; "join inrestErrorsis gone. Wire shape documented in the README.type snapshotOp,snapshotOpsininternal/server/snapshot_ops.go). The client translates it throughundo.op.<op>(undoOpWord) and shows the raw word for an unknown op. German reads "Rückgängig: Speichern auf …".internal/server/testdata/undo_ops.json(regenerate with-update), andi18nParityrequires anundo.op.<op>key per op in en and de.transferand the media ops now have readable English ("move element", "upload media file").element.digest.itemsLabelled.oneis{count} × {label}("1 × Bilder"), the shape the element variant already has. The sidecar schema is unchanged..disabled-links__pathhasoverflow-wrap: anywhere, and the list usesoverflow-x: hidden; overflow-y: auto.refs/deckle/wiptip snapshots the untouched tree asdeckle: baseline. It runs under the mutation lock, before the handler writes. Doing it then instead of at startup also captures hand edits made after the server started.TestBranchModeFirstDraftSaveIsUndoable). A collapsed draft (tip equal to or behind main) has nothing to undo by design.Rules touched and their owners
internal/element/form.goEnabledField(the hint constants inpageops/settings.goandserver/forms.goare deleted)web/src/api/labels.tsdisplayLabelweb/src/components/ElementForm.tsxaccessFieldsinternal/element/values.goFieldError(shared by the 422 and the at-resterrors)"; "web/src/api/client.tsdecodeFieldErrors(the copy inrestErrorsand the Go test helperfoldFieldErrorsare removed)internal/media/gate.go(*RejectError).APIMessagemedia.Gate(Processnow calls it instead of repeating the check)internal/server/media.gowriteMediaReject(the body-limit 413 goes through it too)internal/server/snapshot_ops.gosnapshotOpscutSnapshotOp(parseSnapshotSubjectno longer hardcodes word counts)snapshotOp.namesPagesweb/src/i18n/translate.tsundoOpKey/undoOpWordinternal/gitrepo/snapshot.goRepo.EnsureWIPBaseline, called only fromHandler.ensureWIPBaselineinServeHTTPDocs and skills
onCode/offCode, the form-descriptionerrorslist, the upload error codes, the WIP baseline and branch-mode semantics, and the undo op vocabulary.web/src/i18n/glossary.md: gate refusal wording and the undo op words.scaffold/site/AGENTS.md: unchanged. It documents neither the switch settings, the description'serrors, the refusal messages nor the undo internals.grep -rn 'Enabled\|undo\|upload' scaffold/site/.claude/skills/finds only mentions of the Enabled switch's effect and of which upload types are refused. Both are unchanged, so no skill walks through these behaviours and none were edited.Verification
go vet ./...and gofmt are clean.go test ./...passes, includingagentsdoc_test.go,skills_test.goand theservermessages.jsonexport (regenerated).npx tsc --noEmitandnpx vitest runpass: 3210 tests, includingi18nParityandi18nLeak.npm run buildpasses.TestFirstSaveIsUndoable: fresh site with no wip ref, one save, thenundoAvailable: true, and the undo restores the pre-save file byte for byte.TestMediaUploadEvilSVG422andTestMediaUploadCorruptPNG422: coded 422s.TestMediaUploadOversize413BeforeDecode: coded 413.de.jsonkey.Closes #267
🤖 Generated with Claude Code
The four Enabled-switch hints are apimsg codes (hint.pageEnabledOn/Off, hint.elementEnabledOn/Off), carried as onCode/offCode beside on/off in the switch's settings and resolved by SwitchView through displayLabel, as a note is. The form description's at-rest errors are the save's 422 list [{field, msg, code, args}], folded on the client by decodeFieldErrors — restErrors no longer joins messages itself. Refs #267 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>[autoland] verdict: pass
PASS. Signal: CI aggregate success (ci / build-and-test: npm ci + build + vitest, go vet + go test ./... + build; release skipped as expected on PRs). Branch is current with main (merge-base = origin/main
d7bc3dd), no conflicts; gofmt clean on changed Go files.Conventions: Conventional Commits title and commits (fix(editor|media|undo)); body carries Closes #267; rule owners table per CLAUDE.md; AGENTS.md unchanged with justification (it documents none of the switch settings, at-rest errors shape, refusal codes or undo internals — verified by grep); skills grep stated and verified (only mentions of the Enabled switch's effect and refused upload types).
Scope matches all seven items of #267: coded Enabled hints (onCode/offCode via displayLabel), coded media.RejectError (APIMessage owner; Process now runs Gate), at-rest errors as []element.FieldError folded by decodeFieldErrors (restErrors' '; ' join removed), closed snapshotOp vocabulary with AST + fixture drift tests and i18nParity keys, digest one-form option (b), disabled-links wrap CSS, WIP baseline under the mutation lock (branch mode documented as needing none). README and glossary updated.