Skip to content

fix(ui): keep session tracking controls interactive#275

Merged
auerbachb merged 38 commits into
mainfrom
cursor/session-controls-layer-54a2
Apr 29, 2026
Merged

fix(ui): keep session tracking controls interactive#275
auerbachb merged 38 commits into
mainfrom
cursor/session-controls-layer-54a2

Conversation

@auerbachb
Copy link
Copy Markdown
Owner

@auerbachb auerbachb commented Apr 28, 2026

User description

Summary

  • Keep solo session tracking controls in a persistent web layer while secondary chrome dims instead of disabling pointer events.
  • Keep iOS session secondary chrome rendered with a stable accessibility marker/value while hold tracking remains in the persistent overlay.
  • Merged latest 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:policy
  • npm run build
  • PORT=3037 E2E_BASE_URL=http://127.0.0.1:3037 npx playwright test e2e/session/session-flow.spec.ts --project=mobile-chromium-narrow
  • npm run test:unit (existing Vitest suite discovery issue in src/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.

Open in Web Open in Cursor 

Summary by CodeRabbit

  • New Features

    • Session controls now remain present, interactive and visually dimmed during active sessions.
    • Session tracking layer remains persistently visible for clearer feedback.
    • Accessibility metadata and hittability for session and secondary chrome states improved and stabilized.
  • Tests

    • Added end-to-end test validating dimmed-control session flow and hold behavior.
    • Increased UI test timeouts, added teardown/readiness helpers, and strengthened cold-start and session checks.

CodeAnt-AI Description

Keep session controls usable while the rest of the chrome dims

What Changed

  • While a session is running, the hold-tracking controls stay interactive instead of being blocked when the secondary controls dim.
  • The secondary session controls now stay on screen in a dimmed state instead of disappearing, and iOS exposes a stable marker so their state can be checked reliably.
  • iOS UI tests were updated to wait for the session state more consistently and to cover the dimmed-controls behavior without relying on flaky launch or hover behavior.

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:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

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:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

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.

Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
still-point Ready Ready Preview, Comment Apr 29, 2026 0:01am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Session 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

Cohort / File(s) Summary
End-to-End Tests
e2e/session/session-flow.spec.ts
Adds E2E spec verifying persistent tracking layer, dimmed-but-interactive secondary chrome (pointer-events: auto), and touch/hold label transitions between "Release" and "Hold".
iOS SessionView Implementation
ios/StillPointApp/Views/SessionView.swift
Keeps control panel mounted and visually dims it instead of removing; ties accessibility identifier/value to dimmed state; reserves constant bottom overlay height.
iOS UI Tests / Harness
ios/StillPointAppUITests/StillPointAppUITests.swift
Increases launch timeout, adds app termination in teardown, centralizes auth wait helper, conditions cold-start assertions, hardens keyboard input, and strengthens hold/dimmed-control assertions.
Web SessionView Implementation
src/components/SessionView.tsx
Introduces sessionChromeDimmed (based on isActive & controlsVisible); keeps controls rendered with reduced opacity and pointerEvents: "auto"; adds persistent tracking-layer attribute.
Root accessibility tweak
ios/StillPointApp/Views/RootView.swift
Moves current-view accessibilityIdentifier/value onto a dedicated hidden 1×1 clear view inside the ZStack to scope metadata precisely.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

Suggested labels

size:L

Poem

🐰 I nibble at dimmed chrome tonight,

Soft controls glow with gentle light,
Hold or tap — the labels tell,
Tests hop by to hear the bell,
The session keeps its quiet might.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(ui): keep session tracking controls interactive' directly reflects the main objective of the PR: ensuring session tracking controls remain interactive (with pointer-events: auto) while secondary chrome dims.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/session-controls-layer-54a2

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
@auerbachb auerbachb marked this pull request as ready for review April 28, 2026 13:19
Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Apr 28, 2026

CodeAnt AI is reviewing your PR.

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Apr 28, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 127b2f4 and 225e79c.

📒 Files selected for processing (1)
  • ios/StillPointAppUITests/StillPointAppUITests.swift

Comment thread ios/StillPointAppUITests/StillPointAppUITests.swift Outdated
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Apr 28, 2026

CodeAnt AI finished reviewing your PR.

Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
ios/StillPointAppUITests/StillPointAppUITests.swift (1)

88-90: Add an existence wait before checking pause/resume hittability to reduce flake risk.

isHittable can 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

📥 Commits

Reviewing files that changed from the base of the PR and between 225e79c and 265cc40.

📒 Files selected for processing (1)
  • ios/StillPointAppUITests/StillPointAppUITests.swift

cursoragent and others added 2 commits April 28, 2026 13:40
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
Copy link
Copy Markdown

codeant-ai Bot commented Apr 28, 2026

CodeAnt AI is running Incremental review

@codeant-ai codeant-ai Bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:M This PR changes 30-99 lines, ignoring generated files labels Apr 28, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Apr 28, 2026

CodeAnt AI Incremental review completed.

Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 963e104 and ccee84d.

📒 Files selected for processing (1)
  • ios/StillPointAppUITests/StillPointAppUITests.swift

Comment thread ios/StillPointAppUITests/StillPointAppUITests.swift Outdated
cursoragent and others added 3 commits April 28, 2026 14:53
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
Copy link
Copy Markdown

codeant-ai Bot commented Apr 28, 2026

CodeAnt AI is running Incremental review

@codeant-ai codeant-ai Bot removed the size:M This PR changes 30-99 lines, ignoring generated files label Apr 28, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Apr 28, 2026

CodeAnt AI is running Incremental review

@codeant-ai codeant-ai Bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:L This PR changes 100-499 lines, ignoring generated files labels Apr 28, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Apr 28, 2026

CodeAnt AI Incremental review completed.

cursoragent and others added 3 commits April 28, 2026 23:25
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
Copy link
Copy Markdown

codeant-ai Bot commented May 3, 2026

CodeAnt AI is running the review.

@codeant-ai codeant-ai Bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:M This PR changes 30-99 lines, ignoring generated files labels May 3, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 3, 2026

Sequence Diagram

This 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
Loading

Generated by CodeAnt AI

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 3, 2026

CodeAnt AI finished running the review.

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 3, 2026

CodeAnt AI is running the review.

@codeant-ai codeant-ai Bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:M This PR changes 30-99 lines, ignoring generated files labels May 3, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 3, 2026

Sequence Diagram

This 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
Loading

Generated by CodeAnt AI

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 3, 2026

CodeAnt AI finished running the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants