fix(app): truncate long environment title so action icons stay access… - #8308
fix(app): truncate long environment title so action icons stay access…#8308pooja-bruno wants to merge 2 commits into
Conversation
WalkthroughFixes environment header title truncation in two parallel ChangesEnvironment Header Title Truncation & Flex Layout Fixes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/environments/title-truncation/env-title-truncation.spec.ts (1)
40-41: ⚡ Quick winAvoid confirming destructive delete in an accessibility-focused helper.
Clicking Delete here couples this test to the deletion flow/network path. For this scenario, opening the modal already proves the action is operable; close/cancel keeps the test narrower and less flaky.
As per coding guidelines, “E2E tests must verify user-visible behaviour” and should avoid brittle dependencies unrelated to the behavior under test.
Proposed minimal change
- await locators.modal.button('Delete').click(); - await expect(locators.modal.byTitle('Delete Environment')).toBeHidden(); + await locators.modal.closeButton().click(); + await expect(locators.modal.byTitle('Delete Environment')).toBeHidden();🤖 Prompt for 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. In `@tests/environments/title-truncation/env-title-truncation.spec.ts` around lines 40 - 41, The test currently clicks the Delete button which creates a brittle dependency on the actual deletion flow and network interactions, making it flaky. Replace the locators.modal.button('Delete').click() call with a click on the modal's close or cancel button instead (such as a close icon or 'Cancel' button), and keep the expect statement to verify the modal is hidden after that action. This will prove the modal is operable while keeping the test focused and narrower without coupling to deletion-related dependencies.Source: Coding guidelines
🤖 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.
Nitpick comments:
In `@tests/environments/title-truncation/env-title-truncation.spec.ts`:
- Around line 40-41: The test currently clicks the Delete button which creates a
brittle dependency on the actual deletion flow and network interactions, making
it flaky. Replace the locators.modal.button('Delete').click() call with a click
on the modal's close or cancel button instead (such as a close icon or 'Cancel'
button), and keep the expect statement to verify the modal is hidden after that
action. This will prove the modal is operable while keeping the test focused and
narrower without coupling to deletion-related dependencies.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: fdc68d32-e44a-4664-b404-2f14652d14a1
📒 Files selected for processing (4)
packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/EnvironmentDetails/index.jspackages/bruno-app/src/components/WorkspaceHome/WorkspaceEnvironments/EnvironmentList/EnvironmentDetails/index.jstests/environments/title-truncation/env-title-truncation.spec.tstests/utils/page/locators.ts
✅ Files skipped from review due to trivial changes (2)
- packages/bruno-app/src/components/WorkspaceHome/WorkspaceEnvironments/EnvironmentList/EnvironmentDetails/index.js
- packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/EnvironmentDetails/index.js
Description
Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.
Summary by CodeRabbit
Summary by CodeRabbit