Repository navigation
feat(ui): the field hand lock holds on the Gantt, the timesheet cell and the palette prefill - #37888
Conversation
Claude-Session: https://claude.ai/code/session_01L6bhgWGbDsK1qEW72jibhi Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgWGbDsK1qEW72jibhi Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgWGbDsK1qEW72jibhi Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgWGbDsK1qEW72jibhi Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgWGbDsK1qEW72jibhi Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 3 package(s): 11 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 182 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 829010ad78a87d7b2b40d676f4c8f2c039c3bc23 && git checkout 829010ad78a87d7b2b40d676f4c8f2c039c3bc23
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ddc96d8a4280c69305dd541005cacfbe3e58f4c5 1916ae98dbe07ffc95354785e67ac18107c31501 && git checkout -B drift-repro ddc96d8a4280c69305dd541005cacfbe3e58f4c5 && git merge --no-ff 1916ae98dbe07ffc95354785e67ac18107c31501
node scripts/docs-audit/affected-docs.mjs --json ddc96d8a4280c69305dd541005cacfbe3e58f4c5
|
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Read: card #37448 (body and its five comments), the PR body and file list, the net diff against ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
M1 (must-fix) — the calendar's quick-create dialog writes a hand-locked field, so "every console surface" is false of the head.
S1 (should-fix) — Implementing files, against the contract:
N1 (nit) — the changeset leaves N2 (nit) — Nothing private. Implemented-by: VERDICT: FAIL |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Delta round on record 7214835610 (FAIL at The merge brings only ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. M1: closed. S1: closed. The
Implementing files in the delta, against the contract:
N1: left as is by the dev ( N2: fixed on a prose face, as above. N3 (nit) — the changeset's calendar bullet and the PR body speak of a field "locked by hand" and do not say that a server-locked ( Nothing private. Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 1916ae9 · card #37448 · area s2-data · 2026-11-27T10:39ZL1 checklist
Tier: S. Landing: ready and auto-merge in this stroke. |
Requested by Sales · project thread
Part of #37448
Open surface: the in-app assistant acting for a person. Its writes run in the AI service, which does not read the hand lock, so this pull request does not cover it; card #37898 carries it. The field descriptions, the metadata-form help texts and the MCP
describe_objectguidance name it as the one surface that does not honour the lock yet. Every other surface the card lists is covered, and so is the calendar's quick-create, which the contract review (7214835610) found writing a locked field.Clause-②: no
Metadata-protocol: semantic
Skills-docs: none — no page under skills/** teaches
uiReadonlyor the hand lock (grep on main), so no skill sentence becomes false维护者速读
uiReadonly/uiReadonlyWhen)现在在 Gantt(拖动、调整、进度、连线、就地编辑、自动排程、撤销重做)、工时表单元格、日历快速新建和命令面板预填上都生效。What changes
Each surface reads the one verdict of
@object-ui/core(fieldReadOnlyByHand, or its static halffieldStaticallyReadOnlyByHandwhere no record exists yet) with the shell's predicate scope (usePredicateScope).@object-ui/plugin-gantt, newganttHandLock.ts).ganttPatchByHandjudges each write over the stored record insidehandleTaskUpdateDefault, the handler every bar write reaches: drag, resize, progress handle, in-place edit, auto-schedule, conflict reschedule, and undo/redo (which skipsonBeforeTaskUpdate, so the gate sits on the write itself). A write that changes a locked field is refused: nothing is sent, the bar is put back and a toast gives the read-only reason. A locked field the write leaves unchanged is dropped from the patch, so an in-place title edit still saves when the dates it echoes are locked. Dates compare as instants.persistDependenciesjudges a drawn link over the target record's dependencies field.ganttHandLockedInteractionsnarrows the authored interaction switches by the static half: a move closes when either date is locked, a resize only when both are, and the progress handle and the link tool close with their own field. An authoredfalsestaysfalse.$select, so the predicate operands are on the record.@object-ui/plugin-timesheet).cellEditabletakes alockedByHandjudge: a cell whose record's value field is locked by hand is read-only, so it is neither edited nor cleared. A row, date or value field locked on every record closes the create (grants.create), which also hides Add row.writeCellrefuses a locked update or delete like areadonlyone. The timesheet fetch has no$select, so the operands are on the record.@object-ui/plugin-calendar,ObjectCalendar.tsx). A create is judged by the static half (fieldStaticallyReadOnlyByHand), as the create dialog judges it. Where a field the dialog writes itself (the title field, the start or end field) is locked on every record,quickCreateLockedOwnFieldssends the day click and the range drag to the host's full create form, and a locked date field is left out of that form's prefill. The static half also answersreadonly: true, so a server-locked title or date field now hands off the same way, wheremainopened the dialog and the server dropped the value on insert. A required locked field is left out of the dialog's write (the auto-fill loop skips it), so the server applies itsdefaultValue;requiredFieldsQuickCreateCannotFillcounts one with nodefaultValueas unfillable, so the gesture is handed off rather than offering a write that would be refused. With no host form, nothing is offered, as before.@object-ui/app-shell,paletteCreate.ts). The create-as prefill skips auiReadonlyfield, as it already skippedreadonly. A create is judged by the static half only, as the create dialog judges it.@object-ui/plugin-list).editedInPlacetakes the kanban lane field the board actually uses (kanbanLaneFieldOf: the block'sgroupByField, else the object's detected lifecycle field), so the lane field's lock operands are in$selecteven when the block names nogroupByField(scope addition from comment 7187109328).onCardMove, so the write is the lane (column) field alone, and the existing lane-field gate inObjectKanban.handleCardMoveholds there too. Now pinned.BEHAVIOUR_SEGMENTS).uiReadonlyWhenis not added. The key is authorable only on field definitions underobjects, whichbucketForalready reads as behaviour;readonlyWhenis in the set because inline-grid columns (acolumnsdisplay segment) carry it, and those columns have no hand lock. A pin invalidate-field-consumers.test.tsproves both keys already credit the fields they name; the lint source is unchanged.uiReadonly/uiReadonlyWhenJSDoc and.describe, their metadata-form help texts (all eleven locales), the MCPdescribe_objectguidance and its code comment, and thehandLock.tsheader now say every console surface honours the hand lock, and each names the in-app assistant acting for a person as the one that does not yet. TheuiReadonlysurface lists add "calendar drag and quick-create" (uiReadonlyWhendoes not: a create is not judged by the conditional half). The liveness evidence (packages/spec/liveness/field.json) cites the new readers:ganttHandLock.ts#ganttPatchByHand,ObjectTimesheet.tsx#valueLockedByHand, and the calendar's quick-create. N7: thecel-field-ui-readonly-whenrow of the expression-conformance ledger is reworded (the edit dialog and grid cell callresolveFieldRuleStatedirectly; every other surface goes throughfieldReadOnlyByHand) and lists the Gantt and timesheet readers.Small decisions taken in this pull request
Metadata-protocol: semanticwhere the claim hadnone: the keys' descriptions change what an author'suiReadonly/uiReadonlyWhendoes (five more surfaces lock), so the changeset isminoron the packages that move behaviour.Why
Phase 1 (#37436) routed the dialogs, record page, grid, kanban column drag and calendar drag through
fieldReadOnlyByHand, but a person could still change a hand-locked field from the Gantt, the timesheet cell and the palette's create-as prefill. The card asks the lock to hold on every console surface.Tests
One pin per surface; each was ablated with
scripts/ablation-replace.mjsand went red, then the file was restored (git diff --quiet HEAD).CommandPalette.previewCreate-36286.test.tsxfieldStaticallyReadOnlyByHand(field)→field.readonly === trueListView.lockOperandSelect-36806.test.tsx"the lane field the board detects when the block names none"kanbanLaneFieldOf(...)→ the block'sgroupByFieldObjectGantt.harness.test.tsx"ObjectGantt.handLock-37448"writeundefinedObjectTimesheet.test.tsx"the field hand lock"lockedByHand(...)line disabled&& !createLockedByHandremovedObjectKanban.handLock-36806.test.tsx"a drag on the swimlane board"fieldReadOnlyByHandforced falseObjectCalendar.quickCreateHandLock-37448.test.tsxquickCreateLockedOwn.length === 0made always truerequiredFieldsQuickCreateCannotFilldisabledEach Gantt, timesheet, kanban and calendar describe also carries a CONTROL (an unlocked record or field still writes; on the calendar, a
uiReadonlyWhendoes not judge the create).Acceptance notes
Verification
Head
1916ae98(main merged in twice; no conflict, the merges bring onlymain's content). CI on the head: 61 success, 9 skipped, none failed.chrome/, coreevaluator/) 1650 passed, 148 skipped; UI plugin-calendar and coreevaluator/after the rework 1105 passed, 122 skipped;@objectstack/specsrc/data6893 passed;@objectstack/mcp1589 passed;@objectstack/platform-objects2214 passed;@objectstack/lintvalidate-field-consumers.test.ts203 passed. After the last merge the new calendar pin re-ran: 7 passed.pnpm --filter @objectstack/spec run check:generatedpasses on a fresh spec build (docs, liveness state counts and api-surface included);check:livenesspasses;node scripts/check-i18n-bundles.mjsOK;node scripts/check-nul-bytes.mjspasses.node scripts/pm/dispatch-gates.mjs --commands(122 commands) ran on the first head: every one passes except three that refused on a missing prerequisite (no verdict):check:skill-examples,check:dts-closureandcheck:dual-build-cjs-loads, which read.d.tsfiles this container built without (OS_SKIP_DTS=1). On the rework the families its paths touch were re-run, all exit 0:check-changeset-no-major,check-empty-changeset(and--self-test),check-issue-citations,check:changeset-gate-self-tests,check:doc-authoring,check:i18n,check:i18n-stale-fill,check:issue-citations.TypeScript Type CheckandType Check UIare green on the head.Human Minimum
packages/specholds no runtime logic (only describe and JSDoc text moved there).main, one pull request.packages/specgenerated artifacts regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgWGbDsK1qEW72jibhi