Repository navigation
ios: the review flags marks lying past a wall end (#42) - #53
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
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: Organization UI Review profile: CHILL Plan: Advanced 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 |
|
Note Review skipped Codemetrics is installed on this repository, but it hasn't been added to your team yet. To enable AI code reviews for this repo, go to your dashboard and add house-scanning-master to your team's repositories. |
|
I read ed665c6. The flagging does what the description says. This departs from the manager's #42 decision. He asked for marks past an end to be left out of the export unless the homeowner extends the end. This PR keeps them, for a safety reason: a gas meter just past an unexplored end is still a hazard, and dropping it would tell the server the ground there is clear. I agree with the reasoning, and S2 is making the server name objects past an unexplored end, which fits keeping them. But it's the manager's call, so I've raised it with him. Please don't treat #42's app half as settled until he answers. One small point: the row says "Past the end of your scan" but gives no way to extend the end, only to remove the mark. That's fine while marks stay in the export. If the manager keeps his decision, the row needs a way to extend the end. |
AidenJohnston
left a comment
There was a problem hiding this comment.
Challenger review. The code is sound. liesPastAnEnd handles the boundaries correctly: a mark exactly at an end, or straddling one, is not flagged, and a side with no end is ignored. The set is refreshed on every path that moves an end, including those added by #47 and #48, which go through setEnd/clearEnd and then publishWall. Keeping these marks in the export is the right safety call. There are no project changes and nothing blocking.
- nit (keeps #42 open): the description says the server side "isn't fixed here" and "belongs in
parse_sceneont3/server".t3/serveralready does this.solver.pyreturnsobjects_not_usedfor objects with no footprint past anunexploredend, andtests/test_field_run_2.pycovers run 2's window. The app doesn't decodeobjects_not_used, so the result screen never tells the homeowner that a mark wasn't measured. That leaves the "measured" symptom of #42. Fix: decodeobjects_not_usedintoResultPresentationand show itsmessageon the result screen, in this PR or a follow-up. Until then, write "Part of #42" instead of "Fixes #42". - nit:
ios/HouseScan/Runtime/ScanEngine+Actions.swift:299(deleteFeature) andScanEngine.swift:1080and:1502, which setstate.features = [], don't refreshfeaturesPastEnds, so it keeps stale IDs. This is harmless while it is only used forcontains, but it will be wrong if it is ever counted. Fix: callpublishFeaturesPastEnds()after each of these. - nit: the new row has no UI coverage. Add a
-uiDemoflag that fillsfeaturesPastEndsfor one demo mark inDemoEngine. Then add aScreenStatesUITestsexpectation for "Past the end of your scan". - nit: this conflicts with #51 in
ScanEngine.publishWall. Resolve it by keeping both appended lines.
|
S2's 9e42970 on This PR should show it. Your review flag is the phone's guess, and |
|
Read-only review at |
Pre-CI checkThe queued iOS run for Fix: merge the current From reading the diff, I found nothing else that would fail CI. |
|
Current-head iOS CI at |
Co-authored-by: Cursor <cursoragent@cursor.com>
ed665c6 to
f173c8a
Compare
|
I rechecked new head |
Pre-CI check (after #51 merged)
The hunk is easy to resolve wrong. The base side ends
Correct resolution: keep the base side whole, and put |
|
CI passed on |
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # ios/HouseScan/Runtime/ScanEngine.swift
Merge conflict resolved (085e0ed)Merged #48's |
|
@AidenJohnston I now own the carried review/CI loop. At |
|
@AidenJohnston Post-merge follow-up at |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Problem. In field run 2 the final wall ran from 7 ft 6 in left of the meter to 6 in right of it, but the feature review still listed "AC unit / About 16 ft right of your meter" and "Window / About 7 ft right of your meter" like every other mark. Nothing compared a mark's span with the wall's ends, so the review told the homeowner those marks were part of the scan when the scan no longer covered them. Run 1 showed the same with the AC stand-in 16 ft past the right end.
Fix.
WalkedEnd.liesPastAnEnd(_:leftEnd:rightEnd:)in HouseScanKit: a mark whose span lies wholly past a marked end is outside the scan. A mark reaching an end, or with any of it between the ends, is on the scanned wall.ScanViewState.featuresPastEnds(publishFeaturesPastEnds). It refreshes the set when the ends move (publishWall), when the spans follow the wall (reprojectFeatures) and when a mark is added.WalkedEndTests.marksWhollyPastAnEndLiePastItuses run 2's ends and marks.Not changed: the export. These marks are still written to scene.json, and the server still measures them. Dropping them would be unsafe: a gas meter a foot past an unexplored end can be within clearance of a spot at that end, and leaving it out would send that ground as clear. The export already refuses to drop driveways and fences for the same reason. The issue's server-side point, that a window past an
unexploredend becomes a line on the wall's straight extension, belongs inparse_sceneont3/server. It isn't fixed here.Stacking. This doesn't depend on #47 or #48 and is based on
t3/ios-mvf. It adds to the end ofWalkedEnd.swift,WalkedEndTests.swiftandScanEngine+Ends.swift, away from what #48 changes there, so they should merge in either order.Check on a device. Mark an AC unit or a window a few metres right of the meter, then walk back and end the right side close to the meter with "Wall ends here". On the review, that mark's row should read "Past the end of your scan". Marks between the ends shouldn't.
Fixes #42. GitHub closes issues only on merges into
main, so close #42 by hand when this merges.