Skip to content

Fix main CI sidebar drop metrics test fixture - #6575

Merged
lawrencecchen merged 1 commit into
mainfrom
fix-main-ci-media-activity
Jun 22, 2026
Merged

lawrencecchen merged 1 commit into
mainfrom
fix-main-ci-media-activity

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Jun 22, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the main CI compile failure from https://github.com/manaflow-ai/cmux/actions/runs/27930576162.

The SidebarWorkspaceDropMetricsTests snapshot helper lagged behind SidebarWorkspaceSnapshotBuilder.Snapshot after mediaActivity became a required field. The fix keeps the model initializer explicit and updates the fixture with the neutral BrowserMediaActivity() value, matching the existing snapshot-refresh test helper pattern.

Validation:

  • git diff --check
  • scripts/lint-pbxproj-test-wiring.sh
  • Local xcodebuild test and build-for-testing were blocked by the cmux hq local test guard, so PR CI is the authoritative compile check.

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Note

Low Risk
Test-only fixture update with no production or runtime behavior changes.

Overview
Fixes a main CI compile failure in SidebarWorkspaceDropMetricsTests by updating the workspaceSnapshot() helper so it matches the current SidebarWorkspaceSnapshotBuilder.Snapshot initializer.

Snapshot now requires mediaActivity. The fixture passes a neutral BrowserMediaActivity(), consistent with other snapshot test helpers. Drop-target height behavior under test is unchanged; only the model construction is brought up to date.

Reviewed by Cursor Bugbot for commit f870aa4. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Fixes the main CI compile error by updating SidebarWorkspaceDropMetricsTests to include the required mediaActivity field in the snapshot fixture.

  • Bug Fixes
    • Added mediaActivity: BrowserMediaActivity() to the snapshot initializer to match SidebarWorkspaceSnapshotBuilder.Snapshot and keep the model constructor explicit.

Written for commit f870aa4. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Tests
    • Updated test snapshot construction to include default media activity settings.

@vercel

vercel Bot commented Jun 22, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment Jun 22, 2026 7:27am
cmux-staging Building Building Preview, Comment Jun 22, 2026 7:27am

@coderabbitai

coderabbitai Bot commented Jun 22, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f7e197ee-b5f3-40f8-8edc-f6cf3637e938

📥 Commits

Reviewing files that changed from the base of the PR and between cd09255 and f870aa4.

📒 Files selected for processing (1)
  • cmuxTests/SidebarWorkspaceDropMetricsTests.swift

📝 Walkthrough

Walkthrough

The workspaceSnapshot test helper in SidebarWorkspaceDropMetricsTests is updated to include mediaActivity: BrowserMediaActivity() in the SidebarWorkspaceSnapshotBuilder.Snapshot initializer, where it was previously omitted.

Sidebar Drop Metrics Test Helper

Layer / File(s) Summary
workspaceSnapshot helper: add mediaActivity field
cmuxTests/SidebarWorkspaceDropMetricsTests.swift
The SidebarWorkspaceSnapshotBuilder.Snapshot initializer in workspaceSnapshot(...) now sets mediaActivity to a default BrowserMediaActivity() in addition to finderDirectoryPath.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • manaflow-ai/cmux#6111: Introduces the drop-metrics test suite that relies on the same workspaceSnapshot helper now being modified.
  • manaflow-ai/cmux#6517: Similarly updates test helpers constructing SidebarWorkspaceSnapshotBuilder.Snapshot to include a default mediaActivity: BrowserMediaActivity().

Poem

A snapshot once bare, now carries its weight,
A BrowserMediaActivity joins the slate.
The rabbit hops in, drops the field with care,
No test shall be caught by a missing declare.
🐇✨ One line, one field, all tests play fair!


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Cmux Source Artifacts ❌ Error PR violates source-control-artifacts.md by adding 25+ files in .claude/ (hidden scratch directory), .agents/, and .cursor/ directories that are explicitly prohibited or related to local tool artifa... Remove all .claude/, .agents/, .cursor/ files and .vercelignore from the commit; keep only cmuxTests/SidebarWorkspaceDropMetricsTests.swift containing the mediaActivity fix.
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 (21 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main fix: updating the CI sidebar drop metrics test fixture to address a compile failure.
Description check ✅ Passed The description is comprehensive with clear explanation of the fix, validation approach, and context; however, the Testing section lacks explicit details on local verification and the Demo Video section is not applicable.
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.
Cmux Swift Actor Isolation ✅ Passed Change is in test file (SidebarWorkspaceDropMetricsTests.swift), fixing test helper by adding required mediaActivity field initialization. Swift actor isolation check explicitly passes for tests.
Cmux Swift Blocking Runtime ✅ Passed Test-only change in SidebarWorkspaceDropMetricsTests.swift that adds BrowserMediaActivity() initialization to a test fixture helper, introducing no blocking runtime primitives (semaphores, sleeps,...
Cmux Expensive Synchronous Load ✅ Passed PR modifies only test code (SidebarWorkspaceDropMetricsTests.swift), not production code. Check applies to "production Swift changes" only. No expensive synchronous loads introduced.
Cmux Cache Substitution Correctness ✅ Passed This is a test file change that adds a required mediaActivity parameter to a test helper fixture. No cache substitution or fresh-vs-cached swap occurs; this is test code establishing neutral defa...
Cmux No Hacky Sleeps ✅ Passed This PR modifies a Swift test file (SidebarWorkspaceDropMetricsTests.swift), which is explicitly out of scope for the "cmux no hacky sleeps" check. The check applies only to TypeScript, JavaScript,...
Cmux Algorithmic Complexity ✅ Passed The PR modifies only cmuxTests/SidebarWorkspaceDropMetricsTests.swift, a test file containing test fixtures and helpers. The complexity check explicitly applies only to production code and passes f...
Cmux Swift Concurrency ✅ Passed The PR change adds a single line mediaActivity: BrowserMediaActivity() to a test fixture helper. No legacy async patterns (Dispatch queues, Combine, fire-and-forget Tasks, completion handlers) ar...
Cmux Swift @Concurrent ✅ Passed No async, @concurrent, nonisolated, or actor-isolated code in the PR. The change only adds mediaActivity: BrowserMediaActivity() to a synchronous test helper function, not involving concurrency.
Cmux Swift File And Package Boundaries ✅ Passed Test fixture change in cmuxTests/: minimal bug fix (+1 net line) adding missing required field to test snapshot builder. Test code explicitly allowed per boundaries rules as "test fixtures."
Cmux Swiftpm Lockfiles ✅ Passed SwiftPM lockfile changes comply with rules: cmux-owned .gitignore files only ignore .build/, packages with external dependencies include corresponding Package.resolved diffs, root Xcode `Pack...
Cmux Swift Logging ✅ Passed This is a test file (SidebarWorkspaceDropMetricsTests.swift) that adds mediaActivity initialization to a snapshot helper fixture. The swift-logging rules explicitly allow "Tests and fixtures where...
Cmux User-Facing Error Privacy ✅ Passed This PR modifies only test code (cmuxTests/SidebarWorkspaceDropMetricsTests.swift), adding a required field to a test fixture. The rule explicitly allows test files and this change contains no user...
Cmux Full Internationalization ✅ Passed Test file change adding a required field initializer in a fixture. Per full-internationalization.md, tests and fixtures are explicitly allowed cases exempt from internationalization requirements.
Cmux Swiftui State Layout ✅ Passed Test file with no SwiftUI state code. Change only adds required parameter value to snapshot fixture helper, not violating any Swiftui-state-layout rules.
Cmux Architecture Rethink ✅ Passed Test-only fix adding required mediaActivity field to snapshot builder. No timing code, blocking paths, mutable state, or multi-surface wiring. Complies with allowed cases for small correctness fixe...
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed Test-only fixture file with no window/panel/controller declarations; change only adds mediaActivity field to test data structure builder.
Cmux No Test Or Debug Seam In Production Source ✅ Passed PR modifies only test file (cmuxTests/SidebarWorkspaceDropMetricsTests.swift), not production source under Sources/, so the no-test-debug-seam-in-production-source check is not applicable.
✨ 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 fix-main-ci-media-activity

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.

❤️ Share

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

@greptile-apps

greptile-apps Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds mediaActivity: BrowserMediaActivity() to the workspaceSnapshot fixture helper in SidebarWorkspaceDropMetricsTests after mediaActivity became a required field on SidebarWorkspaceSnapshotBuilder.Snapshot, restoring CI compilation.

  • The change is a one-line addition confined to a test file; no production Sources/ code is touched.
  • BrowserMediaActivity() is the neutral/default value, consistent with the snapshot-refresh helper pattern used elsewhere in the test suite.

Confidence Score: 5/5

Safe to merge — single test-file fix that adds a missing required argument with its default value, restoring compilation with no behavior change.

The change is confined to a test fixture helper. It supplies the newly-required mediaActivity field with BrowserMediaActivity(), the same neutral value used in other snapshot helpers. No production code is modified, no logic changes, and no custom rules are implicated.

No files require special attention.

Important Files Changed

Filename Overview
cmuxTests/SidebarWorkspaceDropMetricsTests.swift Adds the missing mediaActivity: BrowserMediaActivity() argument to the private workspaceSnapshot fixture helper; purely a test-compile fix with no production-code impact.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant Test as SidebarWorkspaceDropMetricsTests
    participant Builder as SidebarWorkspaceSnapshotBuilder
    participant Fixture as workspaceSnapshot()

    Test->>Fixture: calls workspaceSnapshot(...)
    Fixture->>Builder: Snapshot(... finderDirectoryPath: nil, mediaActivity: BrowserMediaActivity())
    Builder-->>Fixture: Snapshot (now compiles ✓)
    Fixture-->>Test: SidebarWorkspaceSnapshotBuilder.Snapshot
    Test->>Test: SidebarWorkspaceRowDropMetrics.dropTargetHeight(snapshot:...)
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant Test as SidebarWorkspaceDropMetricsTests
    participant Builder as SidebarWorkspaceSnapshotBuilder
    participant Fixture as workspaceSnapshot()

    Test->>Fixture: calls workspaceSnapshot(...)
    Fixture->>Builder: Snapshot(... finderDirectoryPath: nil, mediaActivity: BrowserMediaActivity())
    Builder-->>Fixture: Snapshot (now compiles ✓)
    Fixture-->>Test: SidebarWorkspaceSnapshotBuilder.Snapshot
    Test->>Test: SidebarWorkspaceRowDropMetrics.dropTargetHeight(snapshot:...)
Loading

Reviews (1): Last reviewed commit: "Fix sidebar drop metrics test snapshot f..." | Re-trigger Greptile

@lawrencecchen
lawrencecchen merged commit 165af15 into main Jun 22, 2026
31 checks passed
@lawrencecchen
lawrencecchen deleted the fix-main-ci-media-activity branch June 22, 2026 07:40
crmolinaz added a commit to crmolinaz/trex that referenced this pull request Jun 22, 2026
chore: sync fork with upstream cmux main (incl. manaflow-ai#6575)
@lawrencecchen
lawrencecchen restored the fix-main-ci-media-activity branch July 18, 2026 10:24

This branch was successfully deployed

1 active deployment
Preview – cmux — f870aa49 Deployed Jun 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant