test(settings): dev-options + data-management E2E coverage (#969)#1220
test(settings): dev-options + data-management E2E coverage (#969)#1220oxoxDev wants to merge 5 commits intotinyhumansai:mainfrom
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughAdds unit tests for settings reducers, four new E2E specs covering Settings sections 13.2–13.5 (channels/permissions, AI & skills, developer options, data management), and updates the test-coverage matrix documentation to map those flows to E2E specs. ChangesSettings Tests (unit + E2E) and docs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/src/store/__tests__/settingsSlice.test.ts`:
- Line 1: This file has Prettier formatting issues; run the formatter (prettier
--write) on the test file containing the import line "import { describe, expect,
it } from 'vitest';" to fix whitespace/formatting, then recommit the updated
file; optionally ensure your repo's pre-commit or CI prettier hook is configured
so future commits auto-format.
In `@app/test/e2e/specs/settings-data-management.spec.ts`:
- Line 1: This file has Prettier formatting issues; run the formatter (e.g., run
`prettier --write` against the spec file) to reformat imports and the rest of
the file, then stage and commit the changes so CI passes; target the file that
imports waitForApp and waitForAppReady (the test file containing those symbols)
and ensure the updated formatting is included in your PR.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0314ac4e-2bb9-4312-b3e2-cec911b55353
📒 Files selected for processing (6)
app/src/store/__tests__/settingsSlice.test.tsapp/test/e2e/specs/settings-ai-skills.spec.tsapp/test/e2e/specs/settings-channels-permissions.spec.tsapp/test/e2e/specs/settings-data-management.spec.tsapp/test/e2e/specs/settings-dev-options.spec.tsdocs/TEST-COVERAGE-MATRIX.md
…tinyhumansai#969) Resolve `Type Check TypeScript` CI failure on PR tinyhumansai#1220 caused by prettier finding 2 unformatted files in Jules's batch: - app/src/store/__tests__/settingsSlice.test.ts - app/test/e2e/specs/settings-data-management.spec.ts Pure formatting; no logic changes.
24c2e56 to
7cb74b5
Compare
|
@senamakel — pushed Wrapped the final assertion in |
- Add WDIO specs for Developer Options, Data Management, Channels, and AI Skills. - Add Vitest unit tests for settings-related Redux slices. - Update test coverage matrix to reflect new coverage status. - Ensure destructive flows (clear app data) include cancel-then-confirm assertions. Closes issue: 969 Co-authored-by: oxoxDev <164490987+oxoxDev@users.noreply.github.com>
Co-authored-by: oxoxDev <164490987+oxoxDev@users.noreply.github.com>
…tinyhumansai#969) Resolve `Type Check TypeScript` CI failure on PR tinyhumansai#1220 caused by prettier finding 2 unformatted files in Jules's batch: - app/src/store/__tests__/settingsSlice.test.ts - app/test/e2e/specs/settings-data-management.spec.ts Pure formatting; no logic changes.
…tinyhumansai#969) Frontend Coverage (Vitest) flakes on the `backfills snapshot.currentUser from auth.user when currentUser is missing` case in CI: locally and on first runs the snapshot commits before the assertion fires, but CI's slower scheduler can read `ctx` before React's commit-phase render captures the post-commit state. Wrap the final assertion in `waitFor` so it retries until React has flushed the commit. Equivalent to the pattern already used for the `ready` text-content check just above. No behavior change in product code; backfill logic in `normalizeSnapshot` is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0ebd668 to
4cc3fa9
Compare
…rned Pre-existing upstream/main breakage from tinyhumansai#1177 — the ctx_with_learned helper's PromptContext initializer was not updated when curated_snapshot field was added to PromptContext. CI on PR tinyhumansai#1220 fails to compile core lib test without this fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@senamakel test fixed. Two issues stacked under that failure:
All 17 checks now green on |
Summary
settingsRedux slice happy-path + edge cases.docs/TEST-COVERAGE-MATRIX.mdflipped 8 leaves from ❌ → ✅ (13.2.1, 13.2.2, 13.4.1–13.4.3, 13.5.1–13.5.3) and 1 from 🟡 → ✅ (13.3.1).Closes #969ticket; re-signed locally with the maintainer's GPG key before opening this cross-repo PR.Problem
docs/TEST-COVERAGE-MATRIX.md(the gate added by parent epic #773) showed Settings sections 13.2, 13.4, and 13.5 as❌ _missing_ — tracked #969, plus 13.3.1 as🟡 Generic; AI-model-switch unasserted. That meant:The diff-coverage gate in
.github/workflows/coverage.ymlplus the matrix-sync gate in.github/workflows/pr-quality.yml(added by #773 / #965) both treat ❌ rows as live debt; closing this PR closes the gap for the whole 13.x family except 13.1 (already covered).Solution
E2E specs (WDIO, dual-platform per
docs/E2E-TESTING.md):app/test/e2e/specs/settings-channels-permissions.spec.ts(13.2) — drives the channel-list UI, asserts add/remove/permission-toggle outcomes via mock backend reads. UsesclickNativeButton/waitForWebViewfromapp/test/e2e/helpers/element-helpers.tsper the helper contract.app/test/e2e/specs/settings-dev-options.spec.ts(13.4) — covers Webhook Inspection (live request capture), Runtime Logs (filter + tail), Memory Debug (panel render + recall trigger).app/test/e2e/specs/settings-data-management.spec.ts(13.5) — covers Clear App Data, Cache Reset, Full State Reset. Each test runs the cancel path first (assert state retained), then the confirm path (assert state cleared + restart-and-verify-fresh-install for 13.5.3). Uses the shared mock backend admin endpoints (/__admin/reset) to seed/verify state.app/test/e2e/specs/settings-ai-skills.spec.ts(13.3) — drives model-switch + skill-toggle to assert the actual behaviour the matrix calls out.Vitest unit:
app/src/store/__tests__/settingsSlice.test.ts— exercises thesettingsslice's reducers and selectors (happy path + at least one failure / edge case perdocs/TESTING-STRATEGY.mdfailure-path requirement).Matrix:
docs/TEST-COVERAGE-MATRIX.mdrows 13.2.1, 13.2.2, 13.3.1, 13.3.2, 13.4.1, 13.4.2, 13.4.3, 13.5.1, 13.5.2, 13.5.3 updated with the new spec paths and flipped to ✅. 13.3.1 also moves fromVU→VU+WDbecause the new spec gives it the WD layer it was missing.Authoring + signing tradeoff:
git rebase --exec 'git commit --amend --no-edit -S'against the merge-base, preserving the diff exactly (verified:git diff <old-tip> <new-tip> --statis empty). Force-push used--force-with-lease=<old-tip>to be safe against any concurrent push.Submission Checklist
docs/TESTING-STRATEGY.md— 4 new WDIO specs (each with cancel-then-confirm or analogous failure path) + 1 new Vitest suite covering thesettingsslice.app/test/e2e/specs/settings-*.spec.tsandapp/src/store/__tests__/settingsSlice.test.tsare themselves the coverage. Thedocs/TEST-COVERAGE-MATRIX.mdrow updates do not contribute to lcov.docs/TEST-COVERAGE-MATRIX.mdrows 13.2.1, 13.2.2, 13.3.1, 13.3.2, 13.4.1–3, 13.5.1–3 reflect this change.## Related.docs/TESTING-STRATEGY.md) — destructive Data Management specs use mock-backend admin endpoints, no real network.docs/RELEASE-MANUAL-SMOKE.md).Closes #NNNin the## Relatedsection.Impact
app/test/e2e/specs/,app/src/store/__tests__/, anddocs/TEST-COVERAGE-MATRIX.md. No product code, no Rust core, no Tauri shell.element-helpers.ts,clickNativeButton,waitForWebView) and the dual-platform driver split (tauri-driverLinux / Appium Mac2 macOS) perdocs/E2E-TESTING.md.Related
3773865147756428290; re-signed locally before opening this cross-repo PRSummary by CodeRabbit
Tests
Documentation