Skip to content

[codex] Fix Wework CI project dialog tests - #1518

Closed
qdaxb wants to merge 2 commits into
mainfrom
codex/fix-wework-ci
Closed

qdaxb wants to merge 2 commits into
mainfrom
codex/fix-wework-ci

Conversation

@qdaxb

@qdaxb qdaxb commented Jun 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • restore the project create dialog upgrade affordance for low-version devices
  • update Wework layout/sidebar/task-fork tests to use the current folder-picker project flow

Root Cause

The Wework CI failure came from tests that still expected the old project creation UI (project-device-select, project-folder-mode-create, and an always-visible project-name-input) after the dialog moved to the folder-first flow. The same path also exposed that the dialog props for device upgrades were no longer rendered.

Validation

  • pnpm --filter wework exec vitest run --coverage --passWithNoTests
  • pnpm --filter wework lint

Summary by CodeRabbit

  • Tests

    • Refined project-creation dialog assertions and device mock data validation.
    • Updated device tab label verification and device folder path prefilling tests.
    • Improved device upgrade state handling in dialog tests.
  • Refactor

    • Improved device selection logic in project creation to prioritize matching device ID over tab selectability criteria.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ed2ee3a0-8642-4da5-9a1e-28906c190465

📥 Commits

Reviewing files that changed from the base of the PR and between 5b90ea2 and 9a812cc.

📒 Files selected for processing (3)
  • wework/src/components/layout/DesktopWorkbenchLayout.test.tsx
  • wework/src/components/layout/TaskForkDialog.test.tsx
  • wework/src/components/projects/ProjectCreateDialog.tsx

📝 Walkthrough

Walkthrough

ProjectCreateDialog.tsx removes the canSelectDeviceTab requirement from the primary activeDevice lookup, so any device matching activeDeviceId is selected first. Two test files are updated: DesktopWorkbenchLayout.test.tsx adds assertions on tab labels, input absence, and folder path prefill; TaskForkDialog.test.tsx reorders workspace-kind and folder-select UI steps.

Changes

activeDevice Selection Fix and Test Updates

Layer / File(s) Summary
activeDevice selection logic fix
wework/src/components/projects/ProjectCreateDialog.tsx
activeDevice now matches activeDeviceId without requiring canSelectDeviceTab; the filter is only applied in the fallback to the first selectable device.
DesktopWorkbenchLayout test assertions
wework/src/components/layout/DesktopWorkbenchLayout.test.tsx
Adds assertions that device tabs display executor, project-name-input is absent in multiple dialog flows, old-device tab shows 需升级, the local device mock includes device_type/bind_shell/executor_version, and the folder path input is prefilled with /home/ubuntu.
TaskForkDialog workspace-kind selection order fix
wework/src/components/layout/TaskForkDialog.test.tsx
Reorders async steps so project-workspace-kind-worktree is selected before project-folder-select-button, with the device-folder-path-input value assertion following the corrected sequence.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • wecode-ai/Wegent#1139: Directly modifies ProjectCreateDialog.tsx's device-selection behavior, filtering out specific device types from the selectable list — same component and code path as this PR's activeDevice fix.
  • wecode-ai/Wegent#1312: Also modifies DesktopWorkbenchLayout.test.tsx around the project-creation dialog flow with similar assertion patterns.

Poem

🐇 A bunny once picked the wrong device tab,
Constrained by a guard that was rather drab.
Now activeDeviceId leads the way first,
No canSelectDeviceTab to quench its thirst!
The tests rejoice with /home/ubuntu in place —
All assertions lined up, every device in grace. 🎉

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '[codex] Fix Wework CI project dialog tests' is directly related to the changeset, which updates test files and fixes project dialog behavior. It accurately identifies the main purpose of the PR.
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.

✏️ 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 codex/fix-wework-ci

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.

@qdaxb
qdaxb marked this pull request as ready for review June 22, 2026 07:54
@qdaxb qdaxb closed this Jun 23, 2026
@qdaxb
qdaxb deleted the codex/fix-wework-ci branch September 18, 2026 07:34
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