fix(ui): keep session tracking controls interactive#275
Conversation
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughSession chrome now remains mounted but visually dimmed (and interactive) when controls are hidden across web and iOS; tests and UI tests updated to assert dimmed-state accessibility, hold/touch behavior, persistent tracking layer, and extended test timeouts. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
|
CodeAnt AI is reviewing your PR. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ios/StillPointAppUITests/StillPointAppUITests.swift`:
- Around line 50-51: The current call to assertColdStartBoundIfAvailable lets
the test silently pass if the auth root element is missing; change the test to
explicitly require the auth root and assert the bound: after
waitForAuthScreen(in: app) verify that
app.otherElements["root.currentView.auth"] exists (e.g., with an XCTAssert or
assertExists) and then call the strict assertion (or make
assertColdStartBoundIfAvailable fail when the element is missing) so that a
missing or broken auth root fails the suite instead of being skipped; apply the
same change for the other occurrence referenced (lines 324-327).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4656fcfa-05bd-473c-91dd-037ff88de31d
📒 Files selected for processing (1)
ios/StillPointAppUITests/StillPointAppUITests.swift
|
CodeAnt AI finished reviewing your PR. |
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ios/StillPointAppUITests/StillPointAppUITests.swift (1)
88-90: Add an existence wait before checking pause/resume hittability to reduce flake risk.
isHittablecan return false transiently during the dimming transition even when behavior is correct. Waiting for element existence first makes this assertion more deterministic.Proposed hardening diff
let dimmedChrome = app.otherElements["session.secondaryChrome.dimmed"] XCTAssertTrue(dimmedChrome.waitForExistence(timeout: 4), "Secondary controls should dim instead of collapsing") - XCTAssertTrue(app.buttons["session.pauseResumeButton"].isHittable, "Dimmed controls should remain hittable") + let pauseResumeButton = app.buttons["session.pauseResumeButton"] + XCTAssertTrue(pauseResumeButton.waitForExistence(timeout: 2), "Pause/Resume should remain present when chrome is dimmed") + XCTAssertTrue(pauseResumeButton.isHittable, "Dimmed controls should remain hittable") XCTAssertTrue(lightHold.isHittable, "Light distraction hold should stay interactive after controls dim") XCTAssertTrue(hyperfocusHold.isHittable, "Hyperfocus hold should stay interactive after controls dim")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ios/StillPointAppUITests/StillPointAppUITests.swift` around lines 88 - 90, The test checks pause/resume hittability too quickly; first wait for the pause/resume button to exist before asserting isHittable to avoid transient failures. Locate the dimmedChrome variable and the assertion referencing app.buttons["session.pauseResumeButton"].isHittable, capture the button into a local (e.g., pauseButton), call waitForExistence(timeout:) on it with a small timeout, then assert pauseButton.isHittable instead of calling isHittable directly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@ios/StillPointAppUITests/StillPointAppUITests.swift`:
- Around line 88-90: The test checks pause/resume hittability too quickly; first
wait for the pause/resume button to exist before asserting isHittable to avoid
transient failures. Locate the dimmedChrome variable and the assertion
referencing app.buttons["session.pauseResumeButton"].isHittable, capture the
button into a local (e.g., pauseButton), call waitForExistence(timeout:) on it
with a small timeout, then assert pauseButton.isHittable instead of calling
isHittable directly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 636ec62a-fcd6-46ab-b97a-ab054765c785
📒 Files selected for processing (1)
ios/StillPointAppUITests/StillPointAppUITests.swift
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
|
CodeAnt AI is running Incremental review |
|
CodeAnt AI Incremental review completed. |
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ios/StillPointAppUITests/StillPointAppUITests.swift`:
- Around line 337-343: The guard in assertColdStartBoundIfAvailable currently
uses a hardcoded 1s timeout which can fail on slow runners; update the
waitForExistence call to use launchTimeout instead so the method
(assertColdStartBoundIfAvailable) waits the same duration as other checks (e.g.,
waitForAuthScreen/home checks) when waiting for root.currentView.auth before
calling assertColdStartBound(root:maxMs:).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 3a63f0f3-1bf1-4a89-942e-58b2831004d7
📒 Files selected for processing (1)
ios/StillPointAppUITests/StillPointAppUITests.swift
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
|
CodeAnt AI is running Incremental review |
|
CodeAnt AI is running Incremental review |
|
CodeAnt AI Incremental review completed. |
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
|
CodeAnt AI is running the review. |
Sequence DiagramThis PR keeps session tracking (hold) controls persistently interactive while dimming secondary chrome on web and iOS, and adds UI tests that verify the dimmed state via stable markers without blocking user interaction. sequenceDiagram
participant User
participant WebSession
participant IOSUITest
participant IOSApp
User->>WebSession: Begin session on mobile web
WebSession->>WebSession: Show persistent tracking controls and dim secondary chrome
User->>WebSession: Perform distraction and hyperfocus hold gestures
WebSession-->>User: Update hold labels while session continues
IOSUITest->>IOSApp: Launch into active session
IOSApp->>IOSApp: Render session with dimmed secondary chrome accessibility marker
IOSUITest->>IOSApp: Verify hold controls active and chrome reported as dimmed
IOSApp-->>IOSUITest: Complete session and show completion view
Generated by CodeAnt AI |
|
CodeAnt AI finished running the review. |
|
CodeAnt AI is running the review. |
Sequence DiagramThis PR keeps session tracking controls in an always-interactive layer while secondary chrome visually dims on both web and iOS, and adds tests that assert the visual dimming and accessibility markers without breaking interaction. sequenceDiagram
participant WebE2ETest
participant WebSessionView
participant iOSUITest
participant iOSSessionView
WebE2ETest->>WebSessionView: Begin mobile session
WebSessionView->>WebSessionView: Show persistent tracking layer and dim secondary chrome
WebE2ETest->>WebSessionView: Assert tracking layer visible and secondary chrome marked dimmed
WebE2ETest->>WebSessionView: Simulate hold on distraction and hyperfocus buttons
WebSessionView-->>WebE2ETest: Update hold button labels between Hold and Release
iOSUITest->>iOSSessionView: Launch app and navigate to session
iOSSessionView->>iOSSessionView: Dim secondary controls and expose accessibility value dimmed
iOSUITest->>iOSSessionView: Wait for secondary chrome marker value dimmed
iOSUITest->>iOSSessionView: End session and verify completion screen appears
Generated by CodeAnt AI |
|
CodeAnt AI finished running the review. |
User description
Summary
main, preserved its iOS harness updates, restored the accessibility-value helper, removed the duplicate root marker, and split critical iOS selection away from smoke-only and simulator-keyboard-flaky paths.Testing
npm run e2e:policynpm run buildPORT=3037 E2E_BASE_URL=http://127.0.0.1:3037 npx playwright test e2e/session/session-flow.spec.ts --project=mobile-chromium-narrownpm run test:unit(existing Vitest suite discovery issue insrc/lib/thoughtSaving.test.ts)xcodebuild -list -project "ios/StillPoint.xcodeproj"(not available in Linux cloud image)Walkthrough
session_tracking_controls_dimmed_both.webm
Dimmed session controls
To show artifacts inline, enable in settings.
Summary by CodeRabbit
New Features
Tests
CodeAnt-AI Description
Keep session controls usable while the rest of the chrome dims
What Changed
Impact
✅ Fewer unresponsive session controls✅ Clearer dimmed-state feedback during sessions✅ More reliable iOS session testing🔄 Retrigger CodeAnt AI Review
Details
💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.