Skip to content

test(app): cover root empty state#540

Merged
Astro-Han merged 1 commit into
devfrom
codex/i529-root-route-empty-state
May 11, 2026
Merged

test(app): cover root empty state#540
Astro-Han merged 1 commit into
devfrom
codex/i529-root-route-empty-state

Conversation

@Astro-Han

@Astro-Han Astro-Han commented May 11, 2026

Copy link
Copy Markdown
Owner

Summary

Update the root route smoke test to cover the real no-project empty state instead of expecting seeded home entrypoints.

Why

#529 cleanup found that / without an opened project was not explicitly covered. The previous root smoke test expected the seeded session-new-home surface, so it did not lock the empty-state path users see before opening a project.

Related Issue

Refs #529.

Human Review Status

Pending. A human should make the final merge decision after reviewing the final diff and verification evidence.

Review Focus

Please verify the test now matches the intended root-route behavior: no session composer is rendered without a project, the main empty state is visible, the sidebar empty state is visible, and the Open project action opens the directory dialog.

Risk Notes

Test-only change. No product code, schema, dependency, platform, packaging, or permission changes.

How To Verify

Focused E2E: bun run test:e2e -- app/home.spec.ts --grep "root route" --workers=1 -> 1 passed
Typecheck: bun run typecheck -> passed
Diff check: git diff --check -> no whitespace errors

Screenshots or Recordings

Not required. This is a test-only PR with no visible product change.

Checklist

  • Human review status is stated above as pending, approved, or not required
  • I linked the related issue, or stated why there is no issue
  • This PR has type, primary area, and priority labels, or I requested maintainer labeling
  • I described the review focus and any meaningful risks
  • I listed the relevant verification steps and the key result for each
  • I did not introduce unrelated refactors, dependencies, generated files, or file changes beyond the stated scope
  • I manually checked visible UI or copy changes when needed, with screenshots or recordings
  • I considered macOS and Windows impact for platform, packaging, updater, signing, paths, shell, or permissions changes
  • I called out docs, release notes, dependencies, permissions, credentials, deletion behavior, generated content, or local file changes when relevant
  • I reviewed the final diff for unrelated changes and suspicious dependency changes
  • I am targeting dev, and my PR title and commit messages use Conventional Commits in English

Summary by CodeRabbit

  • Tests
    • Updated smoke test to verify empty state behavior when no projects are available, including messaging and dialog functionality.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b3d19bff-81b6-444c-b0cc-eeba4c93730e

📥 Commits

Reviewing files that changed from the base of the PR and between f941040 and 5cb049c.

📒 Files selected for processing (1)
  • packages/app/e2e/app/home.spec.ts

📝 Walkthrough

Walkthrough

The root-route Playwright test is refactored to mock backend API responses and seed localStorage state, then validate that the home component displays the no-project empty state with correct messaging, verifies the sidebar behavior, and confirms the "Open project" dialog interaction works as expected.

Changes

Home Empty State Test

Layer / File(s) Summary
Empty State Behavior Test
packages/app/e2e/app/home.spec.ts
Root-route smoke test mocks API responses for root and project list endpoints, seeds localStorage keys, and asserts home shows "No recent projects" and "Get started…" CTA plus "Open project" button. Verifies composer dock is absent, sidebar displays "No projects open" and "Open a project…" messaging, and "Open project" dialog appears on user action.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A test hops forth, mocking the way,
No projects found—an empty day,
Yet buttons click and dialogs glow,
The homepage dreams of projects to show! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: updating a test to cover the root empty state, which matches the primary objective of the PR.
Description check ✅ Passed The description comprehensively follows the template with all required sections completed: Summary, Why, Related Issue, Human Review Status, Review Focus, Risk Notes, How To Verify, Screenshots, and Checklist all properly filled out.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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/i529-root-route-empty-state

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.

@Astro-Han Astro-Han added bug Something isn't working app Application behavior and product flows P3 Low priority task Narrow execution, audit, spike, migration, tracking, or upstream follow-up work labels May 11, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the E2E tests for the root route to verify the 'no-project' empty state, replacing the previous seeded home entrypoints. The changes include new assertions for empty state text and the 'Open project' button. Feedback suggests scoping the 'Open project' button locator to the sidebar to improve test robustness and avoid reliance on DOM order.

Comment thread packages/app/e2e/app/home.spec.ts Outdated
@Astro-Han Astro-Han force-pushed the codex/i529-root-route-empty-state branch from e9ac3f6 to 9238474 Compare May 11, 2026 05:37
@Astro-Han

Copy link
Copy Markdown
Owner Author

Addressed Gemini review: the test no longer uses .last(). The Open project click is now scoped to the main landmark, which removes the DOM-order dependency; the assertion text is also bilingual to handle CI locale. Resolving the outdated thread.

@Astro-Han Astro-Han force-pushed the codex/i529-root-route-empty-state branch from 9238474 to 5cb049c Compare May 11, 2026 05:53
@Astro-Han

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Astro-Han Astro-Han merged commit 1e965b2 into dev May 11, 2026
22 checks passed
@Astro-Han Astro-Han deleted the codex/i529-root-route-empty-state branch May 11, 2026 06:55
Astro-Han added a commit that referenced this pull request May 11, 2026
* fix(app): restore prompt input bottom radius

* fix(opencode): sync @smoke inventory with home spec retitle from #540
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Application behavior and product flows bug Something isn't working P3 Low priority task Narrow execution, audit, spike, migration, tracking, or upstream follow-up work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant