M3-06 slice 4d: choose a to-one from the inspector - #10
Conversation
In an editable store, a to-one field on the inspector's Details tab can
now be changed in place (EDT-3).
- A link button, "Choose Object…" in the context menu and a VoiceOver
action open the object picker. The object the field leads to now is
marked Linked. What is chosen replaces it, staged as an edit of the
field ("Edit head")
- "Set to Nil" empties an optional to-one that leads somewhere
- The picker is built in one place,
ProjectContext.objectPicker(for:linked:choose:), which the relationships
panel now uses too. toOneChoosing(_:value:of:) describes how a field is
chosen, the way fieldEditing describes how one is typed, so the grid's
text editor never gets a to-one
- Tests: EditingSessionTests +1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AT9wkNZ97Eo3MvLLtP7JHP
Signed-off-by: Claude <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughEditable to-one relationships can now be chosen from inspector fields and cleared when optional. Picker creation is shared with the relationships panel. Tests cover chooser availability, selection, linked-object marking, and clearing. ChangesTo-One Inspector Editing
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant DetailsTab
participant InspectorModel
participant ProjectContext
participant FieldRow
participant ObjectPicker
DetailsTab->>InspectorModel: request toOneChoosing for field
InspectorModel->>ProjectContext: look up to-one chooser
ProjectContext-->>DetailsTab: return optional chooser configuration
DetailsTab->>FieldRow: provide chooser configuration
FieldRow->>ProjectContext: request picker when choose is invoked
ProjectContext-->>FieldRow: return ObjectPicker
FieldRow->>ObjectPicker: present picker
ObjectPicker-->>ProjectContext: selected object reference
ProjectContext-->>FieldRow: stage selected reference as to-one value
Merge Risk: ⚪ Minimal · up to The inspector’s to-one selection and clearing workflow is ready for normal checks before merge; no actionable issue is established by the available evidence. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new inspector action appears limited to an editable store and uses the existing staged-edit path. No introduced security issue was established, but recovery and stale-action behavior are not fully covered by the available tests. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 64.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 6 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
|
Test (macos-15, Xcode 26.3) fails for a reason that isn't this PR's. It is the continue-on-error canary, and it stops on the same error it hits on Generated by Claude Code |
What and why
M3-06, slice 4d. Until now, a to-one could only be changed from the relationships panel. In an editable store, a to-one field on the inspector's Details tab can now be changed where it's shown.
ProjectContext.objectPicker(for:linked:choose:)now builds the picker next to the value-editing rules, and the relationships panel uses it too.toOneChoosing(_:value:of:)says how a field is chosen, the wayfieldEditingsays how one is typed, so the grid's text editor never gets a to-one.EditingSessionTests+1, using a department'shead. It checks:PRD IDs: EDT-3
Checklist
git commit -s, DCO).Redacted).🤖 Generated with Claude Code
https://claude.ai/code/session_01AT9wkNZ97Eo3MvLLtP7JHP
Generated by Claude Code
Summary by CodeRabbit