MistDemo web: zoneName/zoneOwner on query panel (#438) - #453
Conversation
The web backend already accepted optional zoneName/zoneOwner on POST /api/records/query, but the browser never sent them — zone selection was CLI-only. - index.html: optional zone name + zone owner inputs in the query toolbar, matching the existing records-changes-zone precedent. - app.js: forward both fields on the MistKit query body. Blank inputs stay undefined so JSON.stringify omits them and the server's decodeIfPresent still yields nil. - app.js: the CloudKit JS path sets query.zoneID as well, so both backends agree once a zone is entered; owner maps to ownerRecordName there. - A stray zone owner with no zone name is dropped client-side rather than sent, since WebRequests.Query rejects that combination with a 400. - The new inputs join setQueryControlsDisabled's list. Create/update still write to the default zone; those request types have no zone fields on the backend yet, so that stays out of scope. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ReviewReviewed the diff ( Code quality / correctness
Minor observations (non-blocking)
Test coverage
SecurityNo concerns — inputs are plain text values forwarded as JSON string fields through the existing typed PerformanceN/A — no hot paths touched; this only affects a demo app's static resources and per-query request construction. Nice, minimal PR that does exactly what the title says. No blocking issues found. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1.0.0-beta.5 #453 +/- ##
=================================================
+ Coverage 81.83% 81.85% +0.02%
=================================================
Files 197 197
Lines 4778 4784 +6
=================================================
+ Hits 3910 3916 +6
Misses 868 868
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Fold flat zoneName/zoneOwner into an optional ZoneSelector so owner-without-name is unrepresentable, and thread defaulted zoneID through create/update/deleteRecord for upcoming zone-aware writes (#454). Co-authored-by: Cursor <cursoragent@cursor.com>
ReviewNicely scoped, well-tested change for the stated goal (issue #438: zone name/owner inputs on the web query panel). The One scope concern worth a second look before merge: Possible scope creep:
|
Summary
v1.0.0-beta.5after Model zone payload fields: ownerRecordName, zoneType, deleted (#444) #451 (zone payload fields) mergedTest plan
v1.0.0-beta.5Made with Cursor