You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): stabilize shared components and editor controls - #59
User information fields currently remount on unrelated parent updates, clearing text selection. Keep the existing InfoItem component at module scope and add a regression for field identity, selection, zero values and a single API request.
Separate existing verification/settings contexts and hooks, and quota-filter utilities, from component modules. Preserve the verification feature exports, gate cancellation/rejection behavior, API-token scope, method identity and settings defaults. Remove two unused lint-disable comments.
Give the pricing editor mode selector its translated accessible name and select it by role/name. Collect all optional price fields with one standard label query instead of repeated whole-DOM scans. Reuse alert-test controls and scope actions to the current confirmation dialog. Preserve every price/count/expression and financial revision/request/disabled-state assertion. Update the existing continuation-test stub to the extracted hook without changing its assertions.
Validation: 539 frontend tests pass across 34 processes; four new focused regressions, all 60 editor tests, 21 alert tests and the existing 18 continuation tests pass. User-field and missing-mode-label regressions fail on the original code. Typecheck, Prettier for all 22 changed files, ESLint for 20 files without carry-forward diagnostics, production build and both Tailwind CSS checks pass. Test mirrors contain 360 tests and two workflow files.
This is the first of three lint batches: global lint improves from 69 errors / 9 warnings to 60 errors / 1 warning, with no added diagnostics. Two changed files retain five already-recorded ref/effect errors; the global check remains failing. No rules or deadlines were relaxed. Initial runs retained editor and alert timeouts and a stale stub-path failure; the final full run passes after fixing repeated queries and updating that stub.
Compared with pinned New API 718a4e7f9751c5bf1958747cd0c2c895e2b937d4 using immutable GitHub tree/blob evidence. Its oxlint/Vitest rules differ. Implemented independently from existing MAX code; no upstream source, tooling or dependencies were transplanted, and attribution remains intact.
Stacked on windows-test-stability (PR #58); 22 changed files. Backend, financial mutations, schema, permission policy and dependency versions are unchanged. Real database/provider/browser/race coverage is not claimed.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
Also applies to: 148-150, 559-559, 561-564, 566-566, 587-589, 778-781
143-147: 🎯 Functional Correctness
The existing assert.equal(inputs.length, 2) already fails when an expected label is missing. The inner loop runs only after this assertion passes, so no additional non-empty assertion is needed.
📝 Summary
Summary by CodeRabbit
Accessibility
Added a descriptive accessible name to the tiered-pricing editor mode selector, making it easier to identify with assistive technology.
Tests
Expanded coverage for secure verification, settlement dialogs, user information dialogs, and tiered-pricing interactions, including cancellation and error scenarios.
Maintenance
Reorganized shared settings, verification, and quota-filter functionality without changing existing behavior.
The changes reorganize secure-verification and settings contexts, move quota-filter definitions into a library module, and update component markup and runtime tests across the frontend.
Changes: Secure verification
Layer / File(s)
Summary
Context contract and provider wiring web/default/src/features/auth/secure-verification/lib/verification-context.ts, web/default/src/features/auth/secure-verification/components/secure-verification-provider.tsx, web/default/src/features/auth/secure-verification/index.ts
The context contract moves into a library module. The provider imports it, and the package index exports the context and gate hook.
Gate hook and API-token integration web/default/src/features/auth/secure-verification/hooks/use-secure-verification-gate.ts, web/default/src/features/auth/secure-verification/hooks/use-api-token-verification.ts
The gate hook reads the context and throws when no provider is present. The API-token hook imports the gate hook and calls its verification function.
Runtime tests cover provider requirements, callback identity, verification options, cancellation, return values, and rejected verification. The continuation test mocks the gate hook module.
System settings UI
Layer / File(s)
Summary
Settings context and hook web/default/src/features/system-settings/lib/settings-page-context.ts, web/default/src/features/system-settings/components/settings-page-context.tsx, web/default/src/features/system-settings/hooks/use-suppress-settings-section-header.ts, web/default/src/features/system-settings/components/settings-section.tsx
The context moves to a library module, and the header-suppression hook moves to the hooks directory. The settings section imports the hook from its new location.
Tiered-pricing editor accessibility and tests web/default/src/features/system-settings/models/tiered-pricing-editor.tsx, web/default/src/features/system-settings/models/tiered-pricing-editor.runtime.test.tsx
The editor-mode selector receives a translated accessible name. Runtime tests locate that selector and collect labeled inputs with a helper.
Usage-log quota filters
Layer / File(s)
Summary
Quota-filter contract and component imports web/default/src/features/usage-logs/lib/quota-filter.ts, web/default/src/features/usage-logs/components/quota-filter-select.tsx, web/default/src/features/usage-logs/components/common-logs-filter-bar.tsx, web/default/src/features/usage-logs/components/task-logs-filter-bar.tsx
The quota-filter type and validator move into a library module. The select component and filter bars import them from that module.
User info dialog
Layer / File(s)
Summary
Dialog rendering and runtime test web/default/src/features/usage-logs/components/dialogs/user-info-dialog.tsx, web/default/src/features/usage-logs/components/dialogs/user-info-dialog.runtime.test.tsx
The InfoItem renderer moves out of UserInfoDialog. A runtime test checks the request, displayed fields, and selected username after rerendering.
Settlement dialog tests
Layer / File(s)
Summary
Zero-quota and exact-settlement interactions web/default/src/features/smart-ops/alerts.test.tsx
The tests retain settlement buttons across cancellation and scope confirmation controls to their dialogs. They also check disabled actions and request behavior.
The change reorganizes frontend modules and improves tests with no identified behavioral risk. It appears ready to merge after normal checks.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 20 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description check
The description accurately summarizes the changes, preserved behavior, tests, validation results, and known lint status.
Title check
The title clearly summarizes the primary changes to stabilize shared components and editor controls.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
Commit to this branch
Create a new PR
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
A rabbit checks the context, then hops along the trail. A button gets a clearer name; a filter finds its way. Tests open dialogs, then close them with care. The hooks find their home, and the labels stay. I nibble one last comment, and bound away.
Comment @coderabbitai help to get the list of available commands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User information fields currently remount on unrelated parent updates, clearing text selection. Keep the existing InfoItem component at module scope and add a regression for field identity, selection, zero values and a single API request.
Separate existing verification/settings contexts and hooks, and quota-filter utilities, from component modules. Preserve the verification feature exports, gate cancellation/rejection behavior, API-token scope, method identity and settings defaults. Remove two unused lint-disable comments.
Give the pricing editor mode selector its translated accessible name and select it by role/name. Collect all optional price fields with one standard label query instead of repeated whole-DOM scans. Reuse alert-test controls and scope actions to the current confirmation dialog. Preserve every price/count/expression and financial revision/request/disabled-state assertion. Update the existing continuation-test stub to the extracted hook without changing its assertions.
Validation: 539 frontend tests pass across 34 processes; four new focused regressions, all 60 editor tests, 21 alert tests and the existing 18 continuation tests pass. User-field and missing-mode-label regressions fail on the original code. Typecheck, Prettier for all 22 changed files, ESLint for 20 files without carry-forward diagnostics, production build and both Tailwind CSS checks pass. Test mirrors contain 360 tests and two workflow files.
This is the first of three lint batches: global lint improves from 69 errors / 9 warnings to 60 errors / 1 warning, with no added diagnostics. Two changed files retain five already-recorded ref/effect errors; the global check remains failing. No rules or deadlines were relaxed. Initial runs retained editor and alert timeouts and a stale stub-path failure; the final full run passes after fixing repeated queries and updating that stub.
Compared with pinned New API 718a4e7f9751c5bf1958747cd0c2c895e2b937d4 using immutable GitHub tree/blob evidence. Its oxlint/Vitest rules differ. Implemented independently from existing MAX code; no upstream source, tooling or dependencies were transplanted, and attribution remains intact.
Stacked on windows-test-stability (PR #58); 22 changed files. Backend, financial mutations, schema, permission policy and dependency versions are unchanged. Real database/provider/browser/race coverage is not claimed.