Repository navigation
Feat/v3 UI updates - #6618
Feat/v3 UI updates#6618
Conversation
WalkthroughWidespread UI and theme updates: many styling token swaps to theme.primary.text, tightened vertical spacing, added tab hover states, standardized pane margins, modal/footer button layout tweaks, HttpMethodSelector dynamic-width refactor, new semantic status palette and schema, and test helper additions for collection creation. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant HttpMethodSelector
participant TriggerButton
participant MethodSpan as MethodSpan (DOM)
participant CustomInput
participant Theme
User->>HttpMethodSelector: open / interact
HttpMethodSelector->>Theme: read methodColor for current method
Theme-->>HttpMethodSelector: methodColor
HttpMethodSelector->>TriggerButton: render (with methodSpanRef)
TriggerButton->>MethodSpan: attach ref
MethodSpan-->>HttpMethodSelector: report measured width
HttpMethodSelector->>HttpMethodSelector: store previousMethodWidth
User->>HttpMethodSelector: enter custom-input mode
HttpMethodSelector->>HttpMethodSelector: compute contentWidth & minWidth using previousMethodWidth
HttpMethodSelector->>CustomInput: render input with computed width & methodColor
CustomInput-->>User: editable field visible
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
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.
Actionable comments posted: 7
🧹 Nitpick comments (13)
packages/bruno-app/src/components/Sidebar/CreateCollection/index.js (1)
138-143: Read-only input improves UX, but onChange handler is now redundant.The
readOnly={true}addition correctly prevents manual path entry and forces directory picker usage. However, theonChangehandler at lines 141-143 is now unreachable sincereadOnlyblocks typing, and thebrowse()function already updates the field viaformik.setFieldValue.🔎 Optional cleanup to remove dead code
readOnly={true} value={formik.values.collectionLocation || ''} onClick={browse} - onChange={(e) => { - formik.setFieldValue('collectionLocation', e.target.value); - }} />packages/bruno-app/src/ui/MenuDropdown/index.js (1)
422-432: Good accessibility improvement with aria-expanded.The addition of
aria-expandedto both the cloned trigger element and the fallback div properly exposes the dropdown state to assistive technologies. The implementation is correct and consistent across both code paths.Optional: Enhance fallback div accessibility
The fallback div (line 432) could benefit from additional accessibility attributes for keyboard navigation when
childrenis not a valid React element:- : <div onClick={handleTriggerClick} aria-expanded={isOpen} data-testid={testId}>{children}</div>; + : <div onClick={handleTriggerClick} role="button" tabIndex={0} aria-expanded={isOpen} data-testid={testId}>{children}</div>;This would make the fallback path keyboard-accessible, though this is a rare edge case since the primary path handles valid React elements.
packages/bruno-app/src/components/RequestTabs/index.js (2)
123-123: Consider extracting the repeated inline style.The
marginBottom: '3px'inline style is duplicated across all three ActionIcon instances. This magic number lacks context and creates maintenance overhead.Consider one of these approaches:
- Define the adjustment in StyledWrapper and target ActionIcon elements with a CSS class
- Add a variant prop to ActionIcon for toolbar usage
- Extract to a shared constant with a descriptive name
Refactor options
Option 1: Use a CSS class in StyledWrapper
- <ActionIcon size="lg" onClick={leftSlide} aria-label="Left Chevron" style={{ marginBottom: '3px' }}> + <ActionIcon size="lg" onClick={leftSlide} aria-label="Left Chevron" className="toolbar-icon">Then add to StyledWrapper:
.toolbar-icon { margin-bottom: 3px; }Option 2: Extract to a constant
+ const ICON_ALIGNMENT_STYLE = { marginBottom: '3px' }; - <ActionIcon size="lg" onClick={leftSlide} aria-label="Left Chevron" style={{ marginBottom: '3px' }}> + <ActionIcon size="lg" onClick={leftSlide} aria-label="Left Chevron" style={ICON_ALIGNMENT_STYLE}>Based on learnings, styled components should manage CSS rather than inline styles in JSX.
Also applies to: 170-170, 179-179
123-123: Improve aria-label descriptions.The current aria-labels are functional but could be more descriptive:
- "Left Chevron" → "Scroll tabs left"
- "Right Chevron" → "Scroll tabs right"
- "New Request" → "Create new request"
More descriptive labels improve screen reader experience by indicating the action rather than the icon appearance.
Also applies to: 170-170, 179-179
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js (3)
12-29: TriggerButton update looks clean.The addition of
methodSpanReffor width measurement is a sensible approach. One minor nit: there's a trailing space in the className string on line 16.🔎 Remove trailing space
<button type="button" - className="cursor-pointer flex items-center text-left w-full select-none " + className="cursor-pointer flex items-center text-left w-full select-none" {...props} >
39-45: Inconsistent string method and potentially problematic object merge.Two observations:
Line 44 uses
toLocaleLowerCase()but line 112 usestoLowerCase(). For HTTP methods (ASCII-only), these behave identically, but consistency is preferred.The colorMap merges
theme.request.methodsandtheme.request- this could inadvertently include non-color properties fromtheme.request. Compare with the pattern inResponsePane/Timeline/TimelineItem/Common/Method/index.jswhich only accessestheme.request.methods.🔎 Proposed simplification
const methodColor = useMemo(() => { - const colorMap = { - ...theme.request.methods, - ...theme.request - }; - return colorMap[method.toLocaleLowerCase()]; + const methodLower = method.toLowerCase(); + return theme.request.methods[methodLower] || theme.text; }, [method, theme]);
138-159: Dynamic width calculation is well-documented.The comments explaining the width logic are helpful. However, hardcoding
fontSize: '12px'here whileStyledWrapper.jsusestheme.font.size.smcreates a potential inconsistency if the theme's small font size changes.🔎 Consider using theme font size
You could access the theme value here since
useThemeis already imported:style={{ minWidth: minWidthPx, width: currentWidth, maxWidth: 'calc(16ch + 1rem)', - fontSize: '12px' + fontSize: theme.font.size.sm }}packages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.js (1)
25-27: Standardize caret color using theme token.The caret uses a hardcoded RGB value while other similar components (WsBody/BodyMode, BodyModeSelector) use
theme.colors.text.muted. Consider standardizing to the theme token for consistency and maintainability.🔎 Proposed refactor for theme consistency
.caret { - color: rgb(140, 140, 140); - fill: rgb(140 140 140); + color: ${(props) => props.theme.colors.text.muted}; + fill: ${(props) => props.theme.colors.text.muted}; }Based on learnings, styled components should use theme props for colors rather than hardcoded values.
packages/bruno-app/src/components/RequestPane/RequestBody/RequestBodyMode/StyledWrapper.js (1)
16-19: Standardize caret color using theme token.The hardcoded RGB caret color creates inconsistency with other components that use
theme.colors.text.muted. Standardize to the theme token for better maintainability.🔎 Proposed refactor for theme consistency
.caret { - color: rgb(140, 140, 140); - fill: rgb(140, 140, 140); + color: ${(props) => props.theme.colors.text.muted}; + fill: ${(props) => props.theme.colors.text.muted}; }Based on learnings, styled components should use theme props for colors.
packages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/ResponseExampleBody/StyledWrapper.js (1)
41-44: Standardize caret color using theme token.The hardcoded RGB caret color is inconsistent with other components that use
theme.colors.text.muted. Consider standardizing to maintain theme consistency across the application.🔎 Proposed refactor for theme consistency
.caret { - color: rgb(140, 140, 140); - fill: rgb(140 140 140); + color: ${(props) => props.theme.colors.text.muted}; + fill: ${(props) => props.theme.colors.text.muted}; }Based on learnings, styled components should use theme props for colors rather than hardcoded values.
packages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/StyledWrapper.js (1)
29-30: Consider consolidating padding declarations.The
padding-top: 0pxoverride on line 30 works but creates redundancy with thepadding: 4px 0pxdeclaration above.🔎 Simplified padding declaration
- padding: 4px 0px; - padding-top: 0px; + padding: 0px 0px 4px 0px;Or even simpler:
- padding: 4px 0px; - padding-top: 0px; + padding-bottom: 4px;packages/bruno-app/src/components/FolderSettings/StyledWrapper.js (1)
24-26: Consider removing!importantand review hover/active color consistency.The hover effect improves UI interactivity as intended. However:
- The
!importantoverride suggests specificity issues that could be resolved by refactoring the selector chain.- Using the same color (
theme.tabs.active.color) for both hover and active states may reduce visual distinction between these states.🔎 Consider differentiating hover and active states
If theme structure supports it, consider using a distinct hover color:
&:hover { - color: ${(props) => props.theme.tabs.active.color} !important; + color: ${(props) => props.theme.tabs.hover?.color || props.theme.tabs.active.color}; }packages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/StyledWrapper.js (1)
2-2: Remove unused import.The
rgbafunction frompolishedis imported but never used in this file.🔎 Proposed fix
-import { rgba } from 'polished';
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (78)
packages/bruno-app/src/components/BodyModeSelector/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/index.jspackages/bruno-app/src/components/CollectionSettings/Presets/index.jspackages/bruno-app/src/components/CollectionSettings/Script/index.jspackages/bruno-app/src/components/CollectionSettings/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Vars/index.jspackages/bruno-app/src/components/Cookies/ModifyCookieModal/StyledWrapper.jspackages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.jspackages/bruno-app/src/components/FolderSettings/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/FolderSettings/Documentation/index.jspackages/bruno-app/src/components/FolderSettings/Script/index.jspackages/bruno-app/src/components/FolderSettings/StyledWrapper.jspackages/bruno-app/src/components/FolderSettings/Vars/index.jspackages/bruno-app/src/components/Modal/StyledWrapper.jspackages/bruno-app/src/components/Preferences/General/index.jspackages/bruno-app/src/components/RequestPane/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Auth/OAuth2/GrantTypeSelector/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Auth/index.jspackages/bruno-app/src/components/RequestPane/GraphQLRequestPane/index.jspackages/bruno-app/src/components/RequestPane/GrpcBody/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/GrpcQueryUrl/index.jspackages/bruno-app/src/components/RequestPane/GrpcRequestPane/GrpcAuth/index.jspackages/bruno-app/src/components/RequestPane/GrpcRequestPane/index.jspackages/bruno-app/src/components/RequestPane/HttpRequestPane/index.jspackages/bruno-app/src/components/RequestPane/QueryParams/index.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/components/RequestPane/RequestBody/RequestBodyMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Script/index.jspackages/bruno-app/src/components/RequestPane/Vars/index.jspackages/bruno-app/src/components/RequestPane/WSRequestPane/WSAuth/index.jspackages/bruno-app/src/components/RequestPane/WSRequestPane/index.jspackages/bruno-app/src/components/RequestPane/WSSettingsPane/index.jspackages/bruno-app/src/components/RequestPane/WsBody/BodyMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/WsQueryUrl/index.jspackages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmCollectionClose/index.jspackages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmFolderClose/index.jspackages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmRequestClose/index.jspackages/bruno-app/src/components/RequestTabs/RequestTab/SpecialTab.jspackages/bruno-app/src/components/RequestTabs/StyledWrapper.jspackages/bruno-app/src/components/RequestTabs/index.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/ResponseExampleBody/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/GrpcResponsePane/GrpcQueryResult/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/GrpcResponsePane/index.jspackages/bruno-app/src/components/ResponsePane/Overlay/index.jspackages/bruno-app/src/components/ResponsePane/ResponsePaneActions/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Time/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.jspackages/bruno-app/src/components/ResponsePane/WsResponsePane/WSMessagesList/index.jspackages/bruno-app/src/components/ResponsePane/WsResponsePane/index.jspackages/bruno-app/src/components/ResponsePane/index.jspackages/bruno-app/src/components/Sidebar/Collections/CollectionSearch/StyledWrapper.jspackages/bruno-app/src/components/Sidebar/CreateCollection/index.jspackages/bruno-app/src/providers/App/ConfirmAppClose/SaveRequestsModal.jspackages/bruno-app/src/themes/dark/catppuccin-frappe.jspackages/bruno-app/src/themes/dark/catppuccin-macchiato.jspackages/bruno-app/src/themes/dark/catppuccin-mocha.jspackages/bruno-app/src/themes/dark/dark-monochrome.jspackages/bruno-app/src/themes/dark/dark-pastel.jspackages/bruno-app/src/themes/dark/dark.jspackages/bruno-app/src/themes/dark/nord.jspackages/bruno-app/src/themes/dark/vscode.jspackages/bruno-app/src/themes/light/catppuccin-latte.jspackages/bruno-app/src/themes/light/light-monochrome.jspackages/bruno-app/src/themes/light/light-pastel.jspackages/bruno-app/src/themes/light/light.jspackages/bruno-app/src/themes/light/vscode.jspackages/bruno-app/src/themes/schema/oss.jspackages/bruno-app/src/ui/MenuDropdown/index.jspackages/bruno-app/src/ui/ResponsiveTabs/StyledWrapper.js
💤 Files with no reviewable changes (1)
- packages/bruno-app/src/components/ResponsePane/GrpcResponsePane/GrpcQueryResult/StyledWrapper.js
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions.() => {}is good
No space between function name and parentheses.func()notfunc ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly
Files:
packages/bruno-app/src/components/FolderSettings/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/GrpcRequestPane/GrpcAuth/index.jspackages/bruno-app/src/components/RequestPane/GrpcQueryUrl/index.jspackages/bruno-app/src/components/RequestPane/WSSettingsPane/index.jspackages/bruno-app/src/components/RequestPane/WSRequestPane/WSAuth/index.jspackages/bruno-app/src/components/RequestTabs/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/GrpcResponsePane/index.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/StyledWrapper.jspackages/bruno-app/src/ui/ResponsiveTabs/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/WsResponsePane/WSMessagesList/index.jspackages/bruno-app/src/components/RequestPane/GrpcRequestPane/index.jspackages/bruno-app/src/themes/light/light.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.jspackages/bruno-app/src/components/RequestTabs/RequestTab/SpecialTab.jspackages/bruno-app/src/themes/dark/catppuccin-macchiato.jspackages/bruno-app/src/components/RequestPane/HttpRequestPane/index.jspackages/bruno-app/src/components/RequestTabs/index.jspackages/bruno-app/src/components/ResponsePane/ResponsePaneActions/index.jspackages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Auth/OAuth2/GrantTypeSelector/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Script/index.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/ResponseExampleBody/StyledWrapper.jspackages/bruno-app/src/components/FolderSettings/Documentation/index.jspackages/bruno-app/src/components/ResponsePane/index.jspackages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmRequestClose/index.jspackages/bruno-app/src/components/FolderSettings/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.jspackages/bruno-app/src/components/Modal/StyledWrapper.jspackages/bruno-app/src/themes/schema/oss.jspackages/bruno-app/src/themes/dark/nord.jspackages/bruno-app/src/components/Sidebar/Collections/CollectionSearch/StyledWrapper.jspackages/bruno-app/src/themes/dark/catppuccin-frappe.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Time/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.jspackages/bruno-app/src/themes/light/light-monochrome.jspackages/bruno-app/src/themes/light/catppuccin-latte.jspackages/bruno-app/src/components/ResponsePane/Overlay/index.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/index.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/StyledWrapper.jspackages/bruno-app/src/ui/MenuDropdown/index.jspackages/bruno-app/src/components/RequestPane/WsBody/BodyMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/WsQueryUrl/index.jspackages/bruno-app/src/components/RequestPane/RequestBody/RequestBodyMode/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/WsResponsePane/index.jspackages/bruno-app/src/components/RequestPane/QueryParams/index.jspackages/bruno-app/src/components/RequestPane/WSRequestPane/index.jspackages/bruno-app/src/components/RequestPane/GraphQLRequestPane/index.jspackages/bruno-app/src/components/CollectionSettings/Script/index.jspackages/bruno-app/src/components/CollectionSettings/Vars/index.jspackages/bruno-app/src/components/RequestPane/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.jspackages/bruno-app/src/themes/dark/catppuccin-mocha.jspackages/bruno-app/src/components/BodyModeSelector/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Auth/index.jspackages/bruno-app/src/components/CollectionSettings/Presets/index.jspackages/bruno-app/src/components/RequestPane/GrpcBody/StyledWrapper.jspackages/bruno-app/src/components/Preferences/General/index.jspackages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.jspackages/bruno-app/src/components/FolderSettings/Vars/index.jspackages/bruno-app/src/themes/dark/dark.jspackages/bruno-app/src/themes/light/vscode.jspackages/bruno-app/src/components/FolderSettings/Script/index.jspackages/bruno-app/src/components/Cookies/ModifyCookieModal/StyledWrapper.jspackages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmCollectionClose/index.jspackages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Vars/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/StyledWrapper.jspackages/bruno-app/src/themes/light/light-pastel.jspackages/bruno-app/src/components/Sidebar/CreateCollection/index.jspackages/bruno-app/src/themes/dark/dark-pastel.jspackages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmFolderClose/index.jspackages/bruno-app/src/themes/dark/vscode.jspackages/bruno-app/src/providers/App/ConfirmAppClose/SaveRequestsModal.jspackages/bruno-app/src/themes/dark/dark-monochrome.js
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Component CSS might also change layout but Tailwind classes shouldn't define colors
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Use styled component's theme prop to manage CSS colors and not CSS variables when in the context of a styled component or any React component using the styled component
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Use styled component's theme prop to manage CSS colors and not CSS variables when in the context of a styled component or any React component using the styled component
Applied to files:
packages/bruno-app/src/components/FolderSettings/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/RequestTabs/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/StyledWrapper.jspackages/bruno-app/src/ui/ResponsiveTabs/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/ResponsePaneActions/index.jspackages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Auth/OAuth2/GrantTypeSelector/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/ResponseExampleBody/StyledWrapper.jspackages/bruno-app/src/components/FolderSettings/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.jspackages/bruno-app/src/components/Modal/StyledWrapper.jspackages/bruno-app/src/themes/dark/nord.jspackages/bruno-app/src/components/Sidebar/Collections/CollectionSearch/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Time/index.jspackages/bruno-app/src/themes/light/light-monochrome.jspackages/bruno-app/src/components/RequestPane/WsBody/BodyMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/RequestBody/RequestBodyMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.jspackages/bruno-app/src/components/BodyModeSelector/StyledWrapper.jspackages/bruno-app/src/themes/light/vscode.jspackages/bruno-app/src/components/Cookies/ModifyCookieModal/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/StyledWrapper.jspackages/bruno-app/src/themes/light/light-pastel.jspackages/bruno-app/src/themes/dark/dark-pastel.jspackages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/themes/dark/vscode.jspackages/bruno-app/src/themes/dark/dark-monochrome.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Component CSS might also change layout but Tailwind classes shouldn't define colors
Applied to files:
packages/bruno-app/src/components/FolderSettings/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/RequestTabs/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/StyledWrapper.jspackages/bruno-app/src/ui/ResponsiveTabs/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Auth/OAuth2/GrantTypeSelector/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/ResponseExampleBody/StyledWrapper.jspackages/bruno-app/src/components/FolderSettings/Documentation/index.jspackages/bruno-app/src/components/FolderSettings/StyledWrapper.jspackages/bruno-app/src/components/Modal/StyledWrapper.jspackages/bruno-app/src/components/Sidebar/Collections/CollectionSearch/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/WsBody/BodyMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/RequestBody/RequestBodyMode/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Script/index.jspackages/bruno-app/src/components/CollectionSettings/Vars/index.jspackages/bruno-app/src/components/RequestPane/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.jspackages/bruno-app/src/components/BodyModeSelector/StyledWrapper.jspackages/bruno-app/src/components/FolderSettings/Script/index.jspackages/bruno-app/src/components/Cookies/ModifyCookieModal/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Components are used as wrappers to define both self and children components style; Tailwind classes are used specifically for layout based styles
Applied to files:
packages/bruno-app/src/components/FolderSettings/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/WSSettingsPane/index.jspackages/bruno-app/src/components/RequestTabs/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/StyledWrapper.jspackages/bruno-app/src/ui/ResponsiveTabs/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/ResponseExampleBody/StyledWrapper.jspackages/bruno-app/src/components/FolderSettings/Documentation/index.jspackages/bruno-app/src/components/FolderSettings/StyledWrapper.jspackages/bruno-app/src/components/Modal/StyledWrapper.jspackages/bruno-app/src/components/Sidebar/Collections/CollectionSearch/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/RequestBody/RequestBodyMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.jspackages/bruno-app/src/components/BodyModeSelector/StyledWrapper.jspackages/bruno-app/src/components/Cookies/ModifyCookieModal/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/StyledWrapper.js
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.
Applied to files:
packages/bruno-app/src/components/FolderSettings/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/GrpcRequestPane/GrpcAuth/index.jspackages/bruno-app/src/components/RequestPane/GrpcQueryUrl/index.jspackages/bruno-app/src/components/RequestPane/WSSettingsPane/index.jspackages/bruno-app/src/components/RequestPane/WSRequestPane/WSAuth/index.jspackages/bruno-app/src/components/RequestTabs/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/GrpcResponsePane/index.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/StyledWrapper.jspackages/bruno-app/src/ui/ResponsiveTabs/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/WsResponsePane/WSMessagesList/index.jspackages/bruno-app/src/components/RequestPane/GrpcRequestPane/index.jspackages/bruno-app/src/themes/light/light.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.jspackages/bruno-app/src/components/RequestTabs/RequestTab/SpecialTab.jspackages/bruno-app/src/themes/dark/catppuccin-macchiato.jspackages/bruno-app/src/components/RequestPane/HttpRequestPane/index.jspackages/bruno-app/src/components/RequestTabs/index.jspackages/bruno-app/src/components/ResponsePane/ResponsePaneActions/index.jspackages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Auth/OAuth2/GrantTypeSelector/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Script/index.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/ResponseExampleBody/StyledWrapper.jspackages/bruno-app/src/components/FolderSettings/Documentation/index.jspackages/bruno-app/src/components/ResponsePane/index.jspackages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmRequestClose/index.jspackages/bruno-app/src/components/FolderSettings/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.jspackages/bruno-app/src/components/Modal/StyledWrapper.jspackages/bruno-app/src/themes/schema/oss.jspackages/bruno-app/src/themes/dark/nord.jspackages/bruno-app/src/components/Sidebar/Collections/CollectionSearch/StyledWrapper.jspackages/bruno-app/src/themes/dark/catppuccin-frappe.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Time/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.jspackages/bruno-app/src/themes/light/light-monochrome.jspackages/bruno-app/src/themes/light/catppuccin-latte.jspackages/bruno-app/src/components/ResponsePane/Overlay/index.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/index.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/StyledWrapper.jspackages/bruno-app/src/ui/MenuDropdown/index.jspackages/bruno-app/src/components/RequestPane/WsBody/BodyMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/WsQueryUrl/index.jspackages/bruno-app/src/components/RequestPane/RequestBody/RequestBodyMode/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/WsResponsePane/index.jspackages/bruno-app/src/components/RequestPane/QueryParams/index.jspackages/bruno-app/src/components/RequestPane/WSRequestPane/index.jspackages/bruno-app/src/components/RequestPane/GraphQLRequestPane/index.jspackages/bruno-app/src/components/CollectionSettings/Script/index.jspackages/bruno-app/src/components/CollectionSettings/Vars/index.jspackages/bruno-app/src/components/RequestPane/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.jspackages/bruno-app/src/themes/dark/catppuccin-mocha.jspackages/bruno-app/src/components/BodyModeSelector/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Auth/index.jspackages/bruno-app/src/components/CollectionSettings/Presets/index.jspackages/bruno-app/src/components/RequestPane/GrpcBody/StyledWrapper.jspackages/bruno-app/src/components/Preferences/General/index.jspackages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.jspackages/bruno-app/src/components/FolderSettings/Vars/index.jspackages/bruno-app/src/themes/dark/dark.jspackages/bruno-app/src/themes/light/vscode.jspackages/bruno-app/src/components/FolderSettings/Script/index.jspackages/bruno-app/src/components/Cookies/ModifyCookieModal/StyledWrapper.jspackages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmCollectionClose/index.jspackages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Vars/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/StyledWrapper.jspackages/bruno-app/src/themes/light/light-pastel.jspackages/bruno-app/src/components/Sidebar/CreateCollection/index.jspackages/bruno-app/src/themes/dark/dark-pastel.jspackages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmFolderClose/index.jspackages/bruno-app/src/themes/dark/vscode.jspackages/bruno-app/src/providers/App/ConfirmAppClose/SaveRequestsModal.jspackages/bruno-app/src/themes/dark/dark-monochrome.js
📚 Learning: 2025-12-02T09:45:31.709Z
Learnt from: sid-bruno
Repo: usebruno/bruno PR: 6266
File: packages/bruno-app/src/components/ResponsePane/ResponseCopy/index.js:38-38
Timestamp: 2025-12-02T09:45:31.709Z
Learning: In the ResponseCopy component (packages/bruno-app/src/components/ResponsePane/ResponseCopy/index.js), the copy button is intentionally disabled using `!response.data` to prevent copying stream resets which result in empty strings.
Applied to files:
packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/index.jspackages/bruno-app/src/components/ResponsePane/Overlay/index.js
🧬 Code graph analysis (16)
packages/bruno-app/src/components/ResponsePane/WsResponsePane/WSMessagesList/index.js (1)
packages/bruno-app/src/components/ResponsePane/WsResponsePane/WSMessagesList/StyledWrapper.js (1)
StyledWrapper(3-71)
packages/bruno-app/src/themes/light/light.js (3)
packages/bruno-app/src/themes/dark/dark.js (2)
palette(3-57)palette(3-57)packages/bruno-app/src/themes/DesignSystem/Theme.stories.jsx (4)
palette(18-18)palette(55-55)palette(86-86)palette(221-221)packages/bruno-app/src/themes/DesignSystem/Overview.jsx (3)
palette(119-119)palette(327-327)palette(588-588)
packages/bruno-app/src/components/RequestTabs/index.js (1)
packages/bruno-app/src/ui/ActionIcon/index.js (1)
ActionIcon(22-56)
packages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmRequestClose/index.js (1)
packages/bruno-app/src/ui/Button/index.js (1)
Button(4-79)
packages/bruno-app/src/themes/dark/catppuccin-frappe.js (1)
packages/bruno-app/src/themes/dark/catppuccin-mocha.js (1)
colors(6-52)
packages/bruno-app/src/themes/light/catppuccin-latte.js (2)
packages/bruno-app/src/themes/dark/catppuccin-frappe.js (1)
colors(6-52)packages/bruno-app/src/themes/dark/catppuccin-mocha.js (1)
colors(6-52)
packages/bruno-app/src/components/ResponsePane/Overlay/index.js (1)
packages/bruno-app/src/ui/Button/index.js (1)
Button(4-79)
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js (3)
packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.js (2)
useTheme(5-5)methodColor(7-10)packages/bruno-app/src/components/RequestPane/QueryUrl/index.js (2)
useTheme(28-28)method(30-30)packages/bruno-app/src/components/Sidebar/NewRequest/index.js (1)
inputRef(29-29)
packages/bruno-app/src/themes/dark/catppuccin-mocha.js (1)
packages/bruno-app/src/themes/light/catppuccin-latte.js (1)
colors(6-52)
packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js (1)
packages/bruno-app/src/ui/Button/index.js (1)
Button(4-79)
packages/bruno-app/src/themes/light/vscode.js (1)
packages/bruno-app/src/themes/dark/vscode.js (1)
colors(6-61)
packages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmCollectionClose/index.js (1)
packages/bruno-app/src/ui/Button/index.js (1)
Button(4-79)
packages/bruno-app/src/themes/light/light-pastel.js (1)
packages/bruno-app/src/themes/dark/dark-pastel.js (1)
colors(10-60)
packages/bruno-app/src/themes/dark/dark-pastel.js (3)
packages/bruno-app/src/themes/dark/vscode.js (1)
colors(6-61)packages/bruno-app/src/themes/dark/catppuccin-frappe.js (1)
colors(6-52)packages/bruno-app/src/themes/dark/catppuccin-macchiato.js (1)
colors(6-52)
packages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmFolderClose/index.js (1)
packages/bruno-app/src/ui/Button/index.js (1)
Button(4-79)
packages/bruno-app/src/themes/dark/vscode.js (1)
packages/bruno-app/src/themes/dark/dark.js (1)
colors(88-93)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Playwright E2E Tests
- GitHub Check: Unit Tests
- GitHub Check: CLI Tests
- GitHub Check: SSL Tests - Windows
- GitHub Check: SSL Tests - macOS
- GitHub Check: SSL Tests - Linux
| select.textbox { | ||
| appearance: none; | ||
| padding-right: 30px; | ||
| background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); | ||
| background-repeat: no-repeat; | ||
| background-position: right 0.5rem center; | ||
| cursor: pointer; | ||
| } |
There was a problem hiding this comment.
Hardcoded color in SVG dropdown indicator should use theme.
The SVG background image uses a hardcoded color %23999 (#999). Based on learnings, styled components should use theme props for colors rather than hardcoded values.
Consider replacing the hardcoded stroke color with a theme color token, or use a CSS mask approach that can inherit the current text color.
🔎 Proposed fix using theme color
One approach is to reference a theme color in the SVG. However, SVG data URIs don't support dynamic values directly. A better solution is to use CSS mask or filter, or encode the theme color value server-side.
For a simpler fix that maintains consistency with the theme:
select.textbox {
appearance: none;
padding-right: 30px;
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='${(props) => props.theme.text.replace('#', '%23')}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.5rem center;
cursor: pointer;
}Note: If theme.text includes opacity or is an rgba value, you'll need additional logic to extract the hex color. Alternatively, add a dedicated theme token for dropdown indicators.
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
packages/bruno-app/src/components/Modal/StyledWrapper.js lines 130-137: the SVG
data URI currently hardcodes the stroke color to #999; update it so the icon
inherits a theme token instead — replace the SVG’s stroke value with
"currentColor" (or use a mask-image variant) and then set the select.textbox
color property to the appropriate theme token (e.g.,
props.theme.colors.textSecondary) so the indicator color comes from the theme
rather than being hardcoded.
| padding: 4px 0px; | ||
| padding-top: 0px; |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
Consolidate padding declarations.
Setting padding: 4px 0px on line 52 and then immediately overriding padding-top: 0px on line 53 is redundant and reduces maintainability. Replace both with a single declaration for clarity.
🔎 Proposed fix
- padding: 4px 0px;
- padding-top: 0px;
+ padding-bottom: 4px;🤖 Prompt for AI Agents
In packages/bruno-app/src/components/RequestPane/GrpcBody/StyledWrapper.js
around lines 52-53, there are two padding rules where `padding: 4px 0px` is
immediately overridden by `padding-top: 0px`; replace both with a single
consolidated shorthand padding declaration that sets top to 0, right and left to
0, and bottom to 4px (e.g., use the shorthand equivalent of 0 0 4px) so the
style is clear and not redundant.
| &:hover { | ||
| background-color: ${(props) => props.theme.workspace.button.bg}; | ||
| border-color: ${(props) => props.theme.app.collection.toolbar.environmentSelector.hoverBorder} !important; | ||
| color: ${(props) => props.theme.text}; | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, let's read the file to understand the context
head -50 packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/index.jsRepository: usebruno/bruno
Length of output: 1815
🏁 Script executed:
# Search for theme definitions to find available tokens
fd -type f \( -name "theme*" -o -name "*theme*" \) | head -20Repository: usebruno/bruno
Length of output: 228
🏁 Script executed:
# Search for button/menu hover border tokens that might be more appropriate
rg -n "hoverBorder|\.hover" --type=js --type=ts -A 2 -B 2 | head -100Repository: usebruno/bruno
Length of output: 7620
🏁 Script executed:
# Find theme configuration files
find . -path ./node_modules -prune -o -type f \( -name "*theme*" -o -name "*color*" \) -print | grep -E "\.(js|ts|json)$" | head -30Repository: usebruno/bruno
Length of output: 40
🏁 Script executed:
# Look for theme definitions in common directories
fd -type f \( -name "*.js" -o -name "*.ts" -o -name "*.json" \) | xargs rg -l "app\.collection\.toolbar" 2>/dev/null | head -10Repository: usebruno/bruno
Length of output: 651
🏁 Script executed:
# Search for button or menu hover state definitions
rg -n "hoverBorder|&:hover" packages/bruno-app/src/components --type=js -A 3 -B 1 | head -150Repository: usebruno/bruno
Length of output: 14437
🏁 Script executed:
# Search for button hover border tokens that might be more appropriate
rg -n "button.*hover|hover.*button" packages/bruno-app/src --type=js -A 2 -B 1 | head -80Repository: usebruno/bruno
Length of output: 8449
🏁 Script executed:
# Check the EnvironmentSelector to see where this token is actually defined/used
cat packages/bruno-app/src/components/Environments/EnvironmentSelector/StyledWrapper.jsRepository: usebruno/bruno
Length of output: 5614
Use a semantically appropriate button hover border token instead of the environment selector token.
The hover style incorrectly uses theme.app.collection.toolbar.environmentSelector.hoverBorder, which is semantically specific to the environment selector component, not a generic menu button. This creates tight coupling and makes the codebase harder to maintain if environment selector tokens change.
The normal state already uses the generic theme.workspace.border, so the hover state should use a corresponding button or workspace token—consider theme.button.secondary.hoverBorder instead (see globalStyles.js and WorkspaceDocs/StyledWrapper.js for patterns).
The !important flag should not be necessary once the proper token is used; its presence suggests underlying CSS specificity issues that should be resolved through proper cascading rather than overrides.
🤖 Prompt for AI Agents
In packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/index.js
around lines 22 to 25, the hover rule uses the environment selector token and an
unnecessary !important; replace border-color: ${(props) =>
props.theme.app.collection.toolbar.environmentSelector.hoverBorder} !important;
with the semantically appropriate token border-color: ${(props) =>
props.theme.button.secondary.hoverBorder}; and remove the !important; if
specificity issues remain, resolve them by adjusting selector structure or
component order (not by using !important).
| <span className="font-medium" style={{ color: methodColor, fontSize: theme.font.size.xs }}> | ||
| {method} | ||
| </span> |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for method.toUpperCase() usages
echo "=== Searching for .toUpperCase() on method variables ==="
rg -nP --type=js --type=jsx 'method\s*\.\s*toUpperCase\(\)'
echo -e "\n=== Searching for HTTP method rendering patterns ==="
rg -nP --type=js --type=jsx -B2 -A2 '(GET|POST|PUT|DELETE|PATCH|HEAD)' packages/bruno-app/src/components/ | head -80
echo -e "\n=== Looking at the specific file ==="
cat -n packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.jsRepository: usebruno/bruno
Length of output: 892
🏁 Script executed:
#!/bin/bash
# Find where the Method component is imported/used
echo "=== Searching for Method component imports ==="
rg -nP --type=js 'from.*Method' packages/bruno-app/src/components/ | grep -i timeline
echo -e "\n=== Searching for method prop assignments in Timeline ==="
rg -nP --type=js '<Method' packages/bruno-app/src/components/ResponsePane/Timeline/ -B2 -A2
echo -e "\n=== Looking for API/HTTP method definitions ==="
rg -nP --type=js -E '(GET|POST|PUT|DELETE|PATCH|HEAD)' packages/bruno-app/src/utils/ -B1 -A1 | head -60
echo -e "\n=== Checking request structure in the app ==="
find packages/bruno-app/src -name "*.js" -type f | xargs grep -l "method\s*:" | head -5 | xargs -I {} sh -c 'echo "=== {} ===" && head -30 {}'Repository: usebruno/bruno
Length of output: 7445
🏁 Script executed:
#!/bin/bash
# Look at TimelineItem to see where method comes from
echo "=== TimelineItem component ==="
cat -n packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js
echo -e "\n=== Search for where TimelineItem is rendered ==="
rg -n 'TimelineItem' packages/bruno-app/src/components/ResponsePane/Timeline/index.js -B2 -A2
echo -e "\n=== Check timeline data structure ==="
rg -n 'timeline' packages/bruno-app/src/providers/ReduxStore/slices/ -i -B1 -A1 | head -40Repository: usebruno/bruno
Length of output: 8774
🏁 Script executed:
#!/bin/bash
# Check where HTTP methods come from in network requests
echo "=== Checking network request handling ==="
rg -n 'method:' packages/bruno-app/src/ -i -B2 -A2 | head -80
echo -e "\n=== Search for where request.method is set/constructed ==="
rg -n 'request\.method' packages/bruno-app/src/utils/network/ -B1 -A1 | head -60
echo -e "\n=== Check HTTP method constants or defaults ==="
rg -n "method.*=.*['\"]GET['\"]" packages/bruno-app/src/ | head -20
echo -e "\n=== Look for any text-transform or uppercase CSS on method elements ==="
rg -n 'text-transform\|uppercase' packages/bruno-app/src/components/ResponsePane/Timeline/ -B2 -A2Repository: usebruno/bruno
Length of output: 11242
🏁 Script executed:
#!/bin/bash
# Search for other method rendering patterns across the app
echo "=== Search for all .method rendering ==="
rg -n '\{method\}' packages/bruno-app/src/components/ -B2 -A2
echo -e "\n=== Look at similar status/method badge components ==="
rg -n 'className.*method\|className.*status' packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/ -B1 -A3
echo -e "\n=== Check if method values are uppercase in responses ==="
rg -n 'method.*upper' packages/bruno-app/src/ -i | head -20Repository: usebruno/bruno
Length of output: 12770
Add defensive uppercase rendering for method display.
The method is rendered without uppercase transformation, unlike similar components elsewhere. For example, RequestTabs/RequestTab uses className="tab-method uppercase" for CSS-level text transformation, and Devtools/Console explicitly calls .toUpperCase(). While methods should be uppercase throughout the app (curl parser and user input handlers all apply .toUpperCase()), add a CSS uppercase class or apply .toUpperCase() to match the defensive rendering pattern used in comparable components and ensure consistent display regardless of data format.
🤖 Prompt for AI Agents
In
packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.js
around lines 13 to 15, the HTTP method is rendered without forcing uppercase;
update the span to defensively render uppercase by adding the CSS class
"uppercase" to the element's className and rendering the value with optional
chaining and toUpperCase (e.g. use className="font-medium uppercase" and render
{method?.toUpperCase()} so null/undefined is safe and display is consistently
uppercase).
| </> | ||
| )} | ||
| </div> | ||
| <div className="oauth-request-item-header relative cursor-pointer flex items-center justify-between gap-3 min-w-0" onClick={toggleCollapse}> |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check for usage of old class name and verify new class exists
# Search for timeline-item-header usage
echo "=== Searching for old class name ==="
rg -n 'timeline-item-header' --type=js --type=jsx -g '!node_modules'
# Search for oauth-request-item-header styling
echo "=== Searching for new class name styling ==="
rg -n 'oauth-request-item-header' --type=js --type=jsx -g '!node_modules'Repository: usebruno/bruno
Length of output: 212
🏁 Script executed:
# Let's also examine the component file itself to understand the context
echo "=== Examining the TimelineItem component ==="
cat -n packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js | head -40Repository: usebruno/bruno
Length of output: 2463
🏁 Script executed:
# Check for StyledWrapper or styled-components in this file
echo "=== Searching for styled components imports and usage ==="
rg -n 'styled|StyledWrapper' packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js -A 2Repository: usebruno/bruno
Length of output: 585
🏁 Script executed:
# Try rg without file type restrictions to find class name usage
echo "=== Searching for timeline-item-header ==="
rg 'timeline-item-header' --type=js -g '!node_modules'
echo "=== Searching for oauth-request-item-header ==="
rg 'oauth-request-item-header' --type=js -g '!node_modules'Repository: usebruno/bruno
Length of output: 725
🏁 Script executed:
# Let's check the StyledWrapper file to see the CSS definitions
echo "=== Checking StyledWrapper for CSS classes ==="
cat -n packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.jsRepository: usebruno/bruno
Length of output: 3269
🏁 Script executed:
# Let's search more broadly for these class names across the entire codebase
echo "=== Broader search for class names ==="
grep -r 'timeline-item-header\|oauth-request-item-header' packages/bruno-app/src/ --include="*.js" --include="*.jsx" --include="*.ts" --include="*.tsx" 2>/dev/null | head -20Repository: usebruno/bruno
Length of output: 673
Update CSS styles to match the new class name.
The HTML now uses oauth-request-item-header but StyledWrapper.js still defines styles for .timeline-item-header. The new class has no corresponding CSS definition, so the styled-component styles won't apply. Either revert the class name back to timeline-item-header or update the StyledWrapper to define styles for .oauth-request-item-header.
🤖 Prompt for AI Agents
In packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js
around line 21 the markup uses className="oauth-request-item-header" but the
styled wrapper still targets .timeline-item-header; update the StyledWrapper.js
to define the same styles for .oauth-request-item-header (or add a selector that
targets both .timeline-item-header and .oauth-request-item-header) so the
existing styles apply to the new class name; ensure any nested/child selectors
and specificity match the current .timeline-item-header rules so layout and
hover/collapse behaviors remain identical.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js (1)
160-160: Consider using theme-based font size.
fontSize: '12px'is hardcoded. If the theme defines font sizes elsewhere, this could become inconsistent. Not blocking, but worth considering for maintainability.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/components/Sidebar/NewRequest/index.jspackages/bruno-app/src/themes/dark/dark.jspackages/bruno-app/src/themes/light/light-pastel.js
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/bruno-app/src/themes/light/light-pastel.js
- packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/StyledWrapper.js
- packages/bruno-app/src/components/Sidebar/NewRequest/index.js
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions.() => {}is good
No space between function name and parentheses.func()notfunc ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly
Files:
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/themes/dark/dark.js
🧠 Learnings (1)
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.
Applied to files:
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/themes/dark/dark.js
🧬 Code graph analysis (1)
packages/bruno-app/src/themes/dark/dark.js (3)
packages/bruno-app/src/themes/light/light.js (2)
palette(2-56)palette(2-56)packages/bruno-app/src/themes/DesignSystem/Theme.stories.jsx (4)
palette(18-18)palette(55-55)palette(86-86)palette(221-221)packages/bruno-app/src/themes/DesignSystem/Overview.jsx (3)
palette(119-119)palette(327-327)palette(588-588)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: SSL Tests - Windows
- GitHub Check: SSL Tests - macOS
- GitHub Check: SSL Tests - Linux
- GitHub Check: Playwright E2E Tests
- GitHub Check: Unit Tests
- GitHub Check: CLI Tests
🔇 Additional comments (4)
packages/bruno-app/src/themes/dark/dark.js (1)
122-143: LGTM! Clean semantic status theming.The status block follows a consistent pattern across all four intent types, properly reusing the
palette.intentcolors defined earlier. The subtle rgba backgrounds (0.15 opacity) paired with solid text and border colors provide good visual hierarchy.packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js (3)
13-31: LGTM! TriggerButton changes are clean.The
methodSpanRefprop pattern works well for this internal component. Minor note: Line 17 has a trailing space in the className string, but it's harmless.
76-88: LGTM! Width capture logic is solid.Capturing
offsetWidthbefore switching modes ensures the input inherits a sensible minimum width. ThesetTimeoutfor focus is appropriate to defer until after the next render cycle.
175-187: LGTM!Clean structure—
methodColoris applied consistently to the container, andmethodSpanRefis correctly passed toTriggerButtonfor width syncing.
| const methodColor = useMemo(() => { | ||
| const colorMap = { | ||
| ...theme.request.methods, | ||
| ...theme.request | ||
| }; | ||
| return colorMap[method.toLocaleLowerCase()]; | ||
| }, [method, theme]); |
There was a problem hiding this comment.
Potential issue: methodColor may be undefined for custom methods.
If a user enters a custom method like PROPFIND, the lookup at line 46 returns undefined. This passes undefined to style={{ color: methodColor }} which is technically safe (no style applied), but likely unintended. Consider providing a fallback color.
Also, prefer toLowerCase() over toLocaleLowerCase() for HTTP method names—they're ASCII and locale-independent.
🔎 Suggested fix
- return colorMap[method.toLocaleLowerCase()];
- }, [method, theme]);
+ return colorMap[method.toLowerCase()] ?? theme.colors?.text ?? 'inherit';
+ }, [method, theme]);🤖 Prompt for AI Agents
In
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js
around lines 41 to 47, the methodColor lookup can return undefined for custom
methods and uses toLocaleLowerCase(); change the lookup to use
method.toLowerCase() and provide a fallback (e.g. a theme fallback like
theme.request.methods.default or a safe value like theme.colors.text or
'inherit') so style always receives a valid color; implement this inside the
useMemo return (e.g. colorMap[method.toLowerCase()] || fallback) and keep the
dependency array [method, theme].
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/bruno-app/src/themes/dark/catppuccin-macchiato.js (1)
4-4: Standardize to ES6 import syntax.This file uses CommonJS
require()while all other theme files in this PR use ES6importsyntax. For consistency across the theme files, use the same import pattern.🔎 Proposed fix
-const { rgba } = require('polished'); +import { rgba } from 'polished';
🧹 Nitpick comments (7)
tests/preferences/default-collection-location/default-collection-location.spec.js (2)
16-16: Replace arbitrary timeouts with Playwright assertions.Several
waitForTimeoutcalls appear to wait for UI state changes that could be verified with explicit Playwright assertions instead. This would make tests more reliable and faster.🔎 Suggested replacements
// close the preferences await page.getByTestId('modal-close-button').click(); - -// wait for 2 seconds -await page.waitForTimeout(2000); + +// wait for modal to close +await expect(page.locator('.bruno-modal')).not.toBeVisible();Apply similar patterns for lines 39, 62, 80, and 100 where the test is waiting for modal close or UI state transitions.
As per coding guidelines, reduce
page.waitForTimeout()usage unless absolutely necessary and use locator-based expectations instead.Also applies to: 39-39, 62-62, 80-80, 100-100
4-17: Use test.step for better test reporting.The test cases would benefit from
test.stepblocks to organize test actions and make generated reports easier to read.🔎 Example with test.step
test('Should save empty default location', async ({ pageWithUserData: page }) => { - // open preferences - await page.locator('.preferences-button').click(); - - // clear the default location field (readonly input, remove readonly then clear) - const defaultLocationInput = page.locator('.default-collection-location-input'); - await defaultLocationInput.evaluate((el) => { - const input = el; - input.removeAttribute('readonly'); - input.readOnly = false; - }); - await defaultLocationInput.clear(); - - // wait for auto-save to complete (debounce is 500ms) - await page.waitForTimeout(1000); - - // close the preferences - await page.getByTestId('modal-close-button').click(); - - // wait for modal to close - await page.waitForTimeout(500); + await test.step('Open preferences', async () => { + await page.locator('.preferences-button').click(); + }); + + await test.step('Clear default location field', async () => { + const defaultLocationInput = page.locator('.default-collection-location-input'); + await defaultLocationInput.evaluate((el) => { + const input = el; + input.removeAttribute('readonly'); + input.readOnly = false; + }); + await defaultLocationInput.clear(); + }); + + await test.step('Wait for auto-save and close preferences', async () => { + await page.waitForTimeout(1000); + await page.getByTestId('modal-close-button').click(); + await page.waitForTimeout(500); + }); });As per coding guidelines, promote the use of
test.stepas much as possible so generated reports are easier to read.Also applies to: 19-40, 42-63, 65-81, 83-101
tests/request/newlines/newlines-persistence.spec.ts (1)
26-51: Consider reducingwaitForTimeoutusage.The test contains several
page.waitForTimeout()calls that could potentially be replaced with more reliable locator-based waits. Per coding guidelines, minimize timeouts unless absolutely necessary.Example: Replace timeout with locator wait
Instead of arbitrary waits, consider waiting for specific elements or states:
-await page.waitForTimeout(500); +await expect(someLocator).toBeVisible();tests/collection/moving-requests/tag-persistence.spec.ts (1)
11-59: Consider usingtest.stepfor better reporting.Per coding guidelines, promoting
test.stepusage makes generated reports easier to read. The test has several logical sections (create collection, create requests, add tags, move requests, verify) that could benefit from steps.Example: Using test.step
test('Verify tag persistence while moving requests within a collection', async ({ page, createTmpDir }) => { + await test.step('Setup collection and requests with tags', async () => { const locators = buildCommonLocators(page); const collectionName = 'test-collection'; // ... setup code + }); + + await test.step('Move request and verify tag persisted', async () => { // ... move and verify code + }); });tests/collection/moving-tabs/move-tabs.spec.ts (1)
10-86: Consider breaking down long tests withtest.step.These tests have multiple logical phases (create collection, create folder, create request, verify tab order, perform drag/drop, verify result). Using
test.stepwould improve report readability per coding guidelines.Example structure
test('Verify tab move by drag and drop', async ({ page, createTmpDir }) => { + await test.step('Create collection and folder', async () => { // collection and folder creation + }); + + await test.step('Create request and open tabs', async () => { // request creation and tab opening + }); + + await test.step('Verify tab reordering via drag and drop', async () => { // drag/drop and verification + }); });tests/request/encoding/curl-encoding.spec.ts (2)
17-46: Usetest.stepto improve report readability.Break the test into logical steps (e.g., "Create collection and request", "Open code generation dialog", "Verify URL encoding") to make generated reports easier to read and debug.
🔎 Suggested refactor with test.step
test('Should generate code with proper URL encoding for unencoded input', async ({ page, createTmpDir }) => { const collectionName = 'unencoded-test-collection'; const requestName = 'curl-encoding-unencoded'; - // Create collection and request - await createCollection(page, collectionName, await createTmpDir(collectionName)); - await createRequest(page, requestName, collectionName, { url: 'http://base.source?name=John Doe' }); - - // Click the request in the sidebar - await page.locator('.collection-item-name').filter({ hasText: requestName }).first().click(); - - await page.locator('#send-request .infotip').first().click(); - - await expect(page.getByRole('dialog')).toBeVisible(); - await expect(page.getByRole('dialog').locator('.bruno-modal-header-title')).toContainText('Generate Code'); - - const codeEditor = page.locator('.editor-content .CodeMirror').first(); - await expect(codeEditor).toBeVisible(); - - const generatedCode = await codeEditor.textContent(); - - expect(generatedCode).toContain('http://base.source/?name=John%20Doe'); - - await page.getByTestId('modal-close-button').click(); - - await page.getByTestId('modal-close-button').waitFor({ state: 'hidden' }); + await test.step('Create collection and request', async () => { + await createCollection(page, collectionName, await createTmpDir(collectionName)); + await createRequest(page, requestName, collectionName, { url: 'http://base.source?name=John Doe' }); + }); + + await test.step('Open code generation dialog', async () => { + await page.locator('.collection-item-name').filter({ hasText: requestName }).first().click(); + await page.locator('#send-request .infotip').first().click(); + + await expect(page.getByRole('dialog')).toBeVisible(); + await expect(page.getByRole('dialog').locator('.bruno-modal-header-title')).toContainText('Generate Code'); + }); + + await test.step('Verify URL encoding in generated code', async () => { + const codeEditor = page.locator('.editor-content .CodeMirror').first(); + await expect(codeEditor).toBeVisible(); + + const generatedCode = await codeEditor.textContent(); + expect(generatedCode).toContain('http://base.source/?name=John%20Doe'); + }); + + await test.step('Close dialog', async () => { + await page.getByTestId('modal-close-button').click(); + await page.getByTestId('modal-close-button').waitFor({ state: 'hidden' }); + }); });As per coding guidelines, test.step should be used "as much as possible" for better test reports.
48-77: Usetest.stepto improve report readability.Break the test into logical steps (e.g., "Create collection and request", "Open code generation dialog", "Verify URL encoding") to make generated reports easier to read and debug.
🔎 Suggested refactor with test.step
test('Should generate code with proper URL encoding for encoded input', async ({ page, createTmpDir }) => { const collectionName = 'encoded-test-collection'; const requestName = 'curl-encoding-encoded'; - // Create collection and request - await createCollection(page, collectionName, await createTmpDir(collectionName)); - await createRequest(page, requestName, collectionName, { url: 'http://base.source?name=John%20Doe' }); - - // Click the request in the sidebar - await page.locator('.collection-item-name').filter({ hasText: requestName }).first().click(); - - await page.locator('#send-request .infotip').first().click(); - - await expect(page.getByRole('dialog')).toBeVisible(); - await expect(page.getByRole('dialog').locator('.bruno-modal-header-title')).toContainText('Generate Code'); - - const codeEditor = page.locator('.editor-content .CodeMirror').first(); - await expect(codeEditor).toBeVisible(); - - const generatedCode = await codeEditor.textContent(); - - expect(generatedCode).toContain('http://base.source/?name=John%20Doe'); - - await page.getByTestId('modal-close-button').click(); - - await page.getByTestId('modal-close-button').waitFor({ state: 'hidden' }); + await test.step('Create collection and request', async () => { + await createCollection(page, collectionName, await createTmpDir(collectionName)); + await createRequest(page, requestName, collectionName, { url: 'http://base.source?name=John%20Doe' }); + }); + + await test.step('Open code generation dialog', async () => { + await page.locator('.collection-item-name').filter({ hasText: requestName }).first().click(); + await page.locator('#send-request .infotip').first().click(); + + await expect(page.getByRole('dialog')).toBeVisible(); + await expect(page.getByRole('dialog').locator('.bruno-modal-header-title')).toContainText('Generate Code'); + }); + + await test.step('Verify URL encoding in generated code', async () => { + const codeEditor = page.locator('.editor-content .CodeMirror').first(); + await expect(codeEditor).toBeVisible(); + + const generatedCode = await codeEditor.textContent(); + expect(generatedCode).toContain('http://base.source/?name=John%20Doe'); + }); + + await test.step('Close dialog', async () => { + await page.getByTestId('modal-close-button').click(); + await page.getByTestId('modal-close-button').waitFor({ state: 'hidden' }); + }); });As per coding guidelines, test.step should be used "as much as possible" for better test reports.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (24)
packages/bruno-app/src/components/ManageWorkspace/RenameWorkspace/index.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/components/Sidebar/ApiSpecs/CreateApiSpec/index.jspackages/bruno-app/src/components/Sidebar/Collections/Collection/CloneCollection/index.jspackages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/DeleteCollectionItem/index.jspackages/bruno-app/src/components/Sidebar/Collections/Collection/RenameCollection/index.jspackages/bruno-app/src/themes/dark/catppuccin-frappe.jspackages/bruno-app/src/themes/dark/catppuccin-macchiato.jspackages/bruno-app/src/themes/dark/catppuccin-mocha.jspackages/bruno-app/src/themes/dark/dark-monochrome.jspackages/bruno-app/src/themes/dark/dark-pastel.jspackages/bruno-app/src/themes/dark/nord.jspackages/bruno-app/src/themes/dark/vscode.jspackages/bruno-app/src/themes/light/catppuccin-latte.jspackages/bruno-app/src/themes/light/light-monochrome.jspackages/bruno-app/src/themes/light/light-pastel.jspackages/bruno-app/src/themes/light/vscode.jstests/collection/create/create-collection.spec.tstests/collection/moving-requests/tag-persistence.spec.tstests/collection/moving-tabs/move-tabs.spec.tstests/preferences/default-collection-location/default-collection-location.spec.jstests/request/encoding/curl-encoding.spec.tstests/request/newlines/newlines-persistence.spec.tstests/request/save/save.spec.ts
🚧 Files skipped from review as they are similar to previous changes (7)
- packages/bruno-app/src/themes/light/vscode.js
- packages/bruno-app/src/themes/dark/nord.js
- packages/bruno-app/src/themes/light/light-pastel.js
- packages/bruno-app/src/themes/dark/catppuccin-frappe.js
- packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js
- packages/bruno-app/src/themes/dark/dark-monochrome.js
- packages/bruno-app/src/themes/light/catppuccin-latte.js
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions.() => {}is good
No space between function name and parentheses.func()notfunc ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly
Files:
packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/DeleteCollectionItem/index.jstests/preferences/default-collection-location/default-collection-location.spec.jspackages/bruno-app/src/components/Sidebar/ApiSpecs/CreateApiSpec/index.jspackages/bruno-app/src/themes/dark/catppuccin-macchiato.jstests/collection/create/create-collection.spec.tstests/request/newlines/newlines-persistence.spec.tspackages/bruno-app/src/themes/dark/dark-pastel.jstests/collection/moving-requests/tag-persistence.spec.tspackages/bruno-app/src/themes/dark/catppuccin-mocha.jspackages/bruno-app/src/themes/dark/vscode.jstests/request/save/save.spec.tspackages/bruno-app/src/components/Sidebar/Collections/Collection/RenameCollection/index.jspackages/bruno-app/src/components/ManageWorkspace/RenameWorkspace/index.jspackages/bruno-app/src/components/Sidebar/Collections/Collection/CloneCollection/index.jspackages/bruno-app/src/themes/light/light-monochrome.jstests/request/encoding/curl-encoding.spec.tstests/collection/moving-tabs/move-tabs.spec.ts
tests/**/**.*
⚙️ CodeRabbit configuration file
tests/**/**.*: Review the following e2e test code written using the Playwright test library. Ensure that:
Follow best practices for Playwright code and e2e automation
Try to reduce usage of
page.waitForTimeout();in code unless absolutely necessary and the locator cannot be found using existingexpect()playwright callsAvoid using
page.pause()in codeUse locator variables for locators
Avoid using test.only
Use multiple assertions
Promote the use of
test.stepas much as possible so the generated reports are easier to readEnsure that the
fixtureslike the collections are nested inside thefixturesfolderFixture Example*: Here's an example of possible fixture and test pair
. ├── fixtures │ └── collection │ ├── base.bru │ ├── bruno.json │ ├── collection.bru │ ├── ws-test-request-with-headers.bru │ ├── ws-test-request-with-subproto.bru │ └── ws-test-request.bru ├── connection.spec.ts # <- Depends on the collection in ./fixtures/collection ├── headers.spec.ts ├── persistence.spec.ts ├── variable-interpolation │ ├── fixtures │ │ └── collection │ │ ├── environments │ │ ├── bruno.json │ │ └── ws-interpolation-test.bru │ ├── init-user-data │ └── variable-interpolation.spec.ts # <- Depends on the collection in ./variable-interpolation/fixtures/collection └── subproto.spec.ts
Files:
tests/preferences/default-collection-location/default-collection-location.spec.jstests/collection/create/create-collection.spec.tstests/request/newlines/newlines-persistence.spec.tstests/collection/moving-requests/tag-persistence.spec.tstests/request/save/save.spec.tstests/request/encoding/curl-encoding.spec.tstests/collection/moving-tabs/move-tabs.spec.ts
🧠 Learnings (5)
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.
Applied to files:
packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/DeleteCollectionItem/index.jstests/preferences/default-collection-location/default-collection-location.spec.jspackages/bruno-app/src/components/Sidebar/ApiSpecs/CreateApiSpec/index.jspackages/bruno-app/src/themes/dark/catppuccin-macchiato.jspackages/bruno-app/src/themes/dark/dark-pastel.jspackages/bruno-app/src/themes/dark/catppuccin-mocha.jspackages/bruno-app/src/themes/dark/vscode.jspackages/bruno-app/src/components/Sidebar/Collections/Collection/RenameCollection/index.jspackages/bruno-app/src/components/ManageWorkspace/RenameWorkspace/index.jspackages/bruno-app/src/components/Sidebar/Collections/Collection/CloneCollection/index.jspackages/bruno-app/src/themes/light/light-monochrome.js
📚 Learning: 2025-12-16T07:16:23.647Z
Learnt from: sanish-bruno
Repo: usebruno/bruno PR: 6090
File: tests/scripting/hooks/init-user-data/ui-state-snapshot.json:1-8
Timestamp: 2025-12-16T07:16:23.647Z
Learning: For e2e tests in the bruno repository: Collections that are shared between CLI and UI tests (comprehensive test suites testing core functionality) should be placed in `packages/bruno-tests/` to avoid duplication. The `tests/**/fixtures/collection` pattern should be used for test-specific collections that test particular UI behaviors or are specific to a single test file.
Applied to files:
tests/preferences/default-collection-location/default-collection-location.spec.jstests/collection/create/create-collection.spec.tstests/request/newlines/newlines-persistence.spec.tstests/collection/moving-requests/tag-persistence.spec.tstests/request/save/save.spec.tstests/request/encoding/curl-encoding.spec.tstests/collection/moving-tabs/move-tabs.spec.ts
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.test.{js,jsx,ts,tsx} : Add tests for any new functionality or meaningful changes. If code is added, removed, or significantly modified, corresponding tests should be updated or created
Applied to files:
tests/request/newlines/newlines-persistence.spec.ts
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Use styled component's theme prop to manage CSS colors and not CSS variables when in the context of a styled component or any React component using the styled component
Applied to files:
packages/bruno-app/src/themes/dark/dark-pastel.jspackages/bruno-app/src/themes/dark/vscode.jspackages/bruno-app/src/themes/light/light-monochrome.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Use consistent patterns and helper utilities where they improve clarity. Prefer shared test utilities over copy-pasted setup code, but only when it actually reduces complexity
Applied to files:
tests/collection/moving-requests/tag-persistence.spec.ts
🧬 Code graph analysis (5)
tests/collection/create/create-collection.spec.ts (1)
tests/utils/page/actions.ts (1)
createCollection(854-854)
tests/request/newlines/newlines-persistence.spec.ts (2)
tests/utils/page/actions.ts (1)
createCollection(854-854)packages/bruno-electron/src/ipc/network/index.js (1)
collectionPath(338-338)
tests/collection/moving-requests/tag-persistence.spec.ts (2)
tests/utils/page/actions.ts (1)
createCollection(854-854)packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js (2)
createCollection(2347-2367)createCollection(2347-2367)
tests/request/save/save.spec.ts (1)
tests/utils/page/actions.ts (1)
createCollection(854-854)
tests/collection/moving-tabs/move-tabs.spec.ts (1)
packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js (2)
createCollection(2347-2367)createCollection(2347-2367)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Unit Tests
- GitHub Check: Playwright E2E Tests
- GitHub Check: CLI Tests
- GitHub Check: SSL Tests - macOS
- GitHub Check: SSL Tests - Windows
- GitHub Check: SSL Tests - Linux
🔇 Additional comments (25)
tests/preferences/default-collection-location/default-collection-location.spec.js (1)
25-29: Verify that readonly manipulation tests realistic user behavior.The test removes the
readonlyattribute programmatically to enable input editing. If the input is readonly in production, this workaround might not reflect actual user behavior and could mask issues where the input should be editable through legitimate UI interactions (e.g., a button click that toggles readonly state).Additionally, the pattern is duplicated in two places. Consider extracting it into a reusable helper function.
🔎 Suggested helper to reduce duplication
// Add to test file or test utils async function enableReadonlyInput(locator) { await locator.evaluate((el) => { const input = el; input.removeAttribute('readonly'); input.readOnly = false; }); } // Usage: await enableReadonlyInput(defaultLocationInput); await defaultLocationInput.clear();As per coding guidelines, ensure this test approach aligns with the actual user interaction pattern in production.
Also applies to: 48-52
packages/bruno-app/src/components/ManageWorkspace/RenameWorkspace/index.js (1)
61-61: LGTM! Modal size standardization.The update from "sm" to "md" improves visual consistency across the application's modal dialogs.
packages/bruno-app/src/components/Sidebar/ApiSpecs/CreateApiSpec/index.js (1)
169-169: LGTM! Consistent modal sizing.This change aligns with the broader UI update to standardize modal dimensions across the application.
packages/bruno-app/src/components/Sidebar/Collections/Collection/CloneCollection/index.js (1)
88-88: LGTM! Modal size update applied.Consistent with the UI standardization effort across all collection-related modals.
packages/bruno-app/src/components/Sidebar/Collections/Collection/RenameCollection/index.js (1)
45-45: LGTM! Modal sizing standardized.This update maintains consistency with other collection management modals in the PR.
packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/DeleteCollectionItem/index.js (1)
43-43: LGTM! Modal size consistency maintained.The "md" size provides better visual coherence with other confirmation dialogs throughout the application.
tests/request/newlines/newlines-persistence.spec.ts (1)
2-2: LGTM! Clean refactoring to use the helper.The replacement of manual UI steps with
createCollection(page, name, location)improves maintainability and reduces code duplication.Also applies to: 13-13
tests/request/save/save.spec.ts (1)
2-2: LGTM! Cleaner setup with the helper.The
setupfunction is now more concise and readable. ThecreateCollectionhelper abstracts away the UI interaction details.Also applies to: 12-13
tests/collection/moving-requests/tag-persistence.spec.ts (1)
2-2: LGTM! Consistent refactoring across both tests.Both test cases now use the
createCollectionhelper, maintaining consistency and reducing duplication.Also applies to: 17-18, 63-64
tests/collection/moving-tabs/move-tabs.spec.ts (1)
2-2: LGTM! Consistent helper usage.Both tests now use
createCollection, simplifying the setup phase and improving maintainability.Also applies to: 12-12, 90-90
tests/collection/create/create-collection.spec.ts (1)
2-2: LGTM! Clean and consistent.The test now uses both
createCollectionandcreateRequesthelpers, making it concise and maintainable. Good use of test utilities.Also applies to: 14-14
tests/request/encoding/curl-encoding.spec.ts (1)
2-2: Good refactor using helper functions.Replacing manual UI-driven collection creation with the
createCollectionandcreateRequesthelpers improves maintainability and reduces duplication across the test suite.Also applies to: 24-26, 55-57
packages/bruno-app/src/themes/light/light-monochrome.js (2)
78-100: LGTM!The status object implementation is clean and consistent. The pattern of using
rgbafor semi-transparent backgrounds with direct palette references for text and border follows solid design practices.
1-1: Dependency verified:polished(^4.3.1) is present inpackages/bruno-app/package.json. The import statement is valid.packages/bruno-app/src/themes/dark/dark-pastel.js (3)
8-9: LGTM: polished import added correctly.The import statement follows ES6 module syntax and is properly used in the status section below.
62-69: LGTM: palette and intent mapping.The exported palette object with intent mappings provides a clean abstraction for semantic status colors.
98-119: LGTM: status section implementation.The status configurations are well-structured with consistent use of
rgba()for semi-transparent backgrounds and direct palette references for text/border. The 15% opacity provides subtle visual feedback.packages/bruno-app/src/themes/dark/catppuccin-mocha.js (3)
4-4: LGTM: polished import.
54-61: LGTM: palette configuration.Intent mappings align with the Catppuccin Mocha color palette.
90-111: LGTM: status section.Consistent structure with appropriate use of translucent backgrounds.
packages/bruno-app/src/themes/dark/catppuccin-macchiato.js (2)
54-61: LGTM: palette configuration.Intent mappings are appropriate for Catppuccin Macchiato.
90-111: LGTM: status section.Consistent implementation with proper rgba usage for backgrounds.
packages/bruno-app/src/themes/dark/vscode.js (3)
4-5: LGTM: polished import.Correct ES6 module syntax, consistent with other theme files.
63-70: LGTM: palette and intent mapping.Intent colors align well with VS Code Dark+ theme semantics.
99-120: LGTM: status section implementation.Well-structured status configurations with consistent semi-transparent backgrounds using rgba at 15% opacity.
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (4)
packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.js (1)
13-14: Past review suggestion not fully implemented: missing defensive.toUpperCase().While the CSS
uppercaseclass handles visual display, the past review recommended rendering{method?.toUpperCase()}for defensive consistency with other components in the codebase. The current implementation renders the rawmethodvalue, relying solely on CSS transformation.🔎 Apply defensive rendering
- <span className="font-medium uppercase" style={{ color: methodColor, fontSize: theme.font.size.xs }}> - {method} + <span className="font-medium uppercase" style={{ color: methodColor, fontSize: theme.font.size.xs }}> + {method?.toUpperCase()} </span>packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js (1)
23-23: Verify that StyledWrapper defines styles for the new class name.The class name
oauth-request-item-headeris used here, but according to previous review comments,StyledWrapper.jslikely still targets.timeline-item-header. This would cause the styles to not apply.Run this script to confirm whether the StyledWrapper has been updated:
#!/bin/bash # Description: Check if StyledWrapper defines styles for oauth-request-item-header # Search for the new class name in StyledWrapper rg -n 'oauth-request-item-header' packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.js # Also check if old class name still exists rg -n 'timeline-item-header' packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js (2)
41-47: Potential issue:methodColormay beundefinedfor custom methods.This is a duplicate of an existing review comment. Please address the previously flagged issue with
toLocaleLowerCase()vstoLowerCase()and the missing fallback for undefined color values.
140-161: Minor inconsistency: padding calculation vs Tailwind class.This is a duplicate of an existing review comment. Please address the previously flagged comment inconsistency (says "px-3" but code uses "px-2") and ensure the calculation aligns with the actual class.
🧹 Nitpick comments (1)
packages/bruno-app/src/themes/light/light-monochrome.js (1)
42-49: INFO and SUCCESS are now distinct—good improvement!This addresses the previous review concern where both used
'#525252'. Now INFO ('#737373') and SUCCESS ('#525252') have visual differentiation while maintaining the monochrome constraint.Optional: Consider direct initialization.
The empty-object-then-property pattern works, but you could simplify to:
-export const palette = {}; - -palette.intent = { +export const palette = { + intent: { + INFO: '#737373', + SUCCESS: '#525252', + WARNING: '#666666', + DANGER: '#404040' + } +}; - INFO: '#737373', - SUCCESS: '#525252', - WARNING: '#666666', - DANGER: '#404040' -};
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Time/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.jspackages/bruno-app/src/themes/dark/dark-monochrome.jspackages/bruno-app/src/themes/light/light-monochrome.js
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Time/index.js
- packages/bruno-app/src/themes/dark/dark-monochrome.js
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions.() => {}is good
No space between function name and parentheses.func()notfunc ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly
Files:
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/themes/light/light-monochrome.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.js
🧠 Learnings (4)
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Component CSS might also change layout but Tailwind classes shouldn't define colors
Applied to files:
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.
Applied to files:
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/themes/light/light-monochrome.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Use styled component's theme prop to manage CSS colors and not CSS variables when in the context of a styled component or any React component using the styled component
Applied to files:
packages/bruno-app/src/themes/light/light-monochrome.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Components are used as wrappers to define both self and children components style; Tailwind classes are used specifically for layout based styles
Applied to files:
packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js
🧬 Code graph analysis (1)
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js (2)
packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.js (2)
useTheme(5-5)methodColor(7-10)packages/bruno-app/src/components/RequestPane/QueryUrl/index.js (2)
useTheme(28-28)method(30-30)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Playwright E2E Tests
- GitHub Check: Unit Tests
- GitHub Check: CLI Tests
- GitHub Check: SSL Tests - macOS
- GitHub Check: SSL Tests - Windows
- GitHub Check: SSL Tests - Linux
🔇 Additional comments (7)
packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.js (1)
1-1: LGTM: Good performance optimization.The
useMemohook appropriately memoizes the color lookup, avoiding redundant computation on each render. The optional chaining and fallback totheme.textare solid defensive practices.Also applies to: 7-10
packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js (2)
2-2: LGTM! Theme integration is clean.The
useThemeimport and hook usage correctly provide access to theme colors for styling the oauth2 label.Also applies to: 12-12
30-35: LGTM! Timestamp layout is properly structured.The conditional rendering and layout classes correctly position the timestamp on the right side of the header.
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js (3)
13-31: TriggerButton refactor looks good.The new
methodSpanRefprop enables dynamic width synchronization for custom method input, and the layout adjustments (gap-2, px-2) align with the UI updates in this PR. Color styling is now correctly delegated to the parent container.
76-88: Width capture logic is correct.Capturing the method span's
offsetWidthbefore entering custom mode ensures the input maintains appropriate minimum width. Implementation looks solid.
177-183: Dropdown integration looks good.The
methodSpanRefis correctly passed toTriggerButton, and the theme-basedmethodColoris properly applied to the container. The changes integrate well with the dynamic width feature.packages/bruno-app/src/themes/light/light-monochrome.js (1)
1-1: LGTM! Import aligns with new status color structure.The
rgbaimport from polished (v4.3.1) is correctly used for the new semi-transparent status backgrounds.
| const colorMap = { | ||
| ...theme.request.methods, | ||
| ...theme.request | ||
| }; |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Examine the actual code in HttpMethodSelector
echo "=== HttpMethodSelector code (lines 40-50) ==="
cat -n packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js | sed -n '40,50p'
echo -e "\n=== TimelineItem Method code (lines 1-15) ==="
cat -n packages/bruno-app/src/components/RequestPane/TimeLine/TimelineItem/Common/Method/index.js | sed -n '1,15p'Repository: usebruno/bruno
Length of output: 648
🏁 Script executed:
#!/bin/bash
# Search for how colorMap is actually used in HttpMethodSelector
echo "=== How colorMap is used after line 45 ==="
cat -n packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js | sed -n '42,70p'Repository: usebruno/bruno
Length of output: 1131
🏁 Script executed:
#!/bin/bash
# Find theme structure definition
echo "=== Search for theme structure or theme provider ==="
fd -t f -e js -e jsx -e ts -e tsx | xargs grep -l 'request.*methods.*:' | head -10Repository: usebruno/bruno
Length of output: 260
🏁 Script executed:
#!/bin/bash
# Search for similar spreading patterns with theme.request
echo "=== Similar spreading patterns in codebase ==="
rg -n 'theme\.request' packages/bruno-app/src/components --type=js --type=jsx -C1 | head -80Repository: usebruno/bruno
Length of output: 149
🏁 Script executed:
#!/bin/bash
# Find the correct path for Method component
echo "=== Search for Method component in TimelineItem ==="
fd -t f -name 'index.js' -o -name 'Method.js' | grep -i timeline | head -20Repository: usebruno/bruno
Length of output: 357
🏁 Script executed:
#!/bin/bash
# Search for theme structure definition
echo "=== Find theme provider or theme definition ==="
fd -t f \( -name 'theme*' -o -name '*Theme*' \) | grep -E '(js|tsx?|jsx)$' | head -20Repository: usebruno/bruno
Length of output: 353
🏁 Script executed:
#!/bin/bash
# Look for theme.request usage patterns
echo "=== All theme.request usages ==="
rg 'theme\.request' packages/bruno-app/src --type=js -A2 -B1 | head -100Repository: usebruno/bruno
Length of output: 10333
🏁 Script executed:
#!/bin/bash
# Check if theme.request has both methods and other properties
echo "=== Check theme object structure in codebase ==="
rg 'theme\.request\s*[:=]' packages/bruno-app/src --type=js -A10 | head -100Repository: usebruno/bruno
Length of output: 106
🏁 Script executed:
#!/bin/bash
# Find theme definitions
echo "=== Find theme provider/context ==="
fd theme packages/bruno-app/src --type f | grep -E '\.(js|jsx|ts|tsx)$' | head -30Repository: usebruno/bruno
Length of output: 154
🏁 Script executed:
#!/bin/bash
# Search for useTheme hook to understand theme structure
echo "=== Find useTheme hook definition ==="
rg 'export.*useTheme|function useTheme' packages/bruno-app/src --type js -A5Repository: usebruno/bruno
Length of output: 564
🏁 Script executed:
#!/bin/bash
# Look for how method colors are accessed elsewhere
echo "=== Method color access patterns ==="
rg 'colorMap\[|theme\.request\.methods\[' packages/bruno-app/src --type js -B2 -A2Repository: usebruno/bruno
Length of output: 1663
🏁 Script executed:
#!/bin/bash
# Check if this is a real issue by seeing if method color lookup actually works
echo "=== Check HttpMethodSelector full implementation ==="
cat packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jsRepository: usebruno/bruno
Length of output: 5861
🏁 Script executed:
#!/bin/bash
# Check theme structure definition
echo "=== Theme definitions ==="
fd theme packages/bruno-app --type f | xargs cat | grep -A20 '"request"' | head -60Repository: usebruno/bruno
Length of output: 83
🏁 Script executed:
#!/bin/bash
# Look for theme object literal or defaults
echo "=== Search for request theme keys ==="
rg 'request\s*[:=]\s*\{' packages/bruno-app --type js -A20 | head -80Repository: usebruno/bruno
Length of output: 9000
🏁 Script executed:
#!/bin/bash
# Find theme files with method/request structure
echo "=== Theme structure files ==="
fd --type f | xargs grep -l 'request.*methods' | grep -i theme | head -10Repository: usebruno/bruno
Length of output: 16805
🏁 Script executed:
#!/bin/bash
# Examine the Theme provider
echo "=== Theme Provider Implementation ==="
cat packages/bruno-app/src/providers/Theme/index.jsRepository: usebruno/bruno
Length of output: 4519
🏁 Script executed:
#!/bin/bash
# Look for theme defaults or initial values
echo "=== Search for theme initialization ==="
rg 'request.*=|request\s*:' packages/bruno-app/src/providers --type js -B2 -A5 | head -100Repository: usebruno/bruno
Length of output: 9196
🏁 Script executed:
#!/bin/bash
# Look for themes directory and structure
echo "=== Find themes directory ==="
fd -t d themes packages/bruno-app/src | head -5Repository: usebruno/bruno
Length of output: 172
🏁 Script executed:
#!/bin/bash
# Check themes structure
echo "=== Examine themes index ==="
head -100 packages/bruno-app/src/themes/index.jsRepository: usebruno/bruno
Length of output: 2487
🏁 Script executed:
#!/bin/bash
# Look at a specific theme file to understand request.methods structure
echo "=== Check light theme ==="
cat packages/bruno-app/src/themes/themes/light.js | head -150Repository: usebruno/bruno
Length of output: 178
🏁 Script executed:
#!/bin/bash
# Find the actual light theme file
echo "=== Find light theme file ==="
fd -t f light.js packages/bruno-app/src/themesRepository: usebruno/bruno
Length of output: 132
🏁 Script executed:
#!/bin/bash
# Check what's in themes/light directory
echo "=== List themes directory structure ==="
find packages/bruno-app/src/themes -type f -name '*.js' | head -20Repository: usebruno/bruno
Length of output: 886
🏁 Script executed:
#!/bin/bash
# Look at a light theme
echo "=== Examine a theme file ==="
find packages/bruno-app/src/themes -type f -name '*.js' | head -1 | xargs wc -lRepository: usebruno/bruno
Length of output: 146
🏁 Script executed:
#!/bin/bash
# Look at light theme structure, focusing on request section
echo "=== Light theme request section ==="
cat packages/bruno-app/src/themes/light/light.js | grep -A40 "request:"Repository: usebruno/bruno
Length of output: 1182
🏁 Script executed:
#!/bin/bash
# Check RequestTab component to compare patterns
echo "=== RequestTab colorMap pattern ==="
cat packages/bruno-app/src/components/RequestTabs/RequestTab/index.js | grep -B5 -A10 "colorMap"Repository: usebruno/bruno
Length of output: 523
Simplify colorMap spreading for clarity.
The double-spread pattern {...theme.request.methods, ...theme.request} is redundant. Since theme.request contains methods as a nested object plus other properties (grpc, ws, gql) that aren't method colors, only the first spread is needed for the lookup. Use theme.request.methods[method.toLocaleLowerCase()] directly, matching the cleaner pattern in ResponsePane/Timeline/TimelineItem/Common/Method/index.js.
🤖 Prompt for AI Agents
In
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js
around lines 42-45, the colorMap is built with a redundant double spread
({...theme.request.methods, ...theme.request}); remove the extra spread and
either set colorMap to theme.request.methods only or replace usages to read
theme.request.methods[method.toLocaleLowerCase()] directly so method color
lookups use the nested methods object without merging the whole theme.request.
| <div className="flex items-center gap-1"> | ||
| <Method method={method} /> | ||
| <div className="truncate flex-1 min-w-0">{url}</div> | ||
| {isOauth2 && <span className="text-xs flex-shrink-0" style={{ color: theme.colors.text.muted }}>[oauth2.0]</span>} |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
Move inline color style to StyledWrapper.
Line 28 uses an inline style to apply theme.colors.text.muted. Per project guidelines, colors should be defined in the StyledWrapper using theme props rather than inline styles in JSX.
🔎 Proposed refactor
Add a style rule in StyledWrapper.js for the oauth label:
.oauth-request-item-header {
.oauth-label {
color: ${(props) => props.theme.colors.text.muted};
}
}Then update the JSX:
- {isOauth2 && <span className="text-xs flex-shrink-0" style={{ color: theme.colors.text.muted }}>[oauth2.0]</span>}
+ {isOauth2 && <span className="oauth-label text-xs flex-shrink-0">[oauth2.0]</span>}Based on learnings: Use styled component's theme prop to manage CSS colors, not inline styles.
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js
around line 28, an inline style applies theme.colors.text.muted to the oauth2
label; move this color into the StyledWrapper instead. Edit StyledWrapper.js to
add a selector for the oauth label (e.g., .oauth-request-item-header
.oauth-label) that sets color: ${(props) => props.theme.colors.text.muted}; then
remove the inline style from the JSX and add a className (e.g., "oauth-label")
to the span so styling comes from the styled component.
| status: { | ||
| info: { | ||
| background: rgba(palette.intent.INFO, 0.15), | ||
| text: palette.intent.INFO, | ||
| border: palette.intent.INFO | ||
| }, | ||
| success: { | ||
| background: rgba(palette.intent.SUCCESS, 0.15), | ||
| text: palette.intent.SUCCESS, | ||
| border: palette.intent.SUCCESS | ||
| }, | ||
| warning: { | ||
| background: rgba(palette.intent.WARNING, 0.15), | ||
| text: palette.intent.WARNING, | ||
| border: palette.intent.WARNING | ||
| }, | ||
| danger: { | ||
| background: rgba(palette.intent.DANGER, 0.15), | ||
| text: palette.intent.DANGER, | ||
| border: palette.intent.DANGER | ||
| } | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, check if the file exists and examine its contents
fd "light-monochrome.js" packages/Repository: usebruno/bruno
Length of output: 113
🏁 Script executed:
# Read the file to see the content and find color definitions
cat -n packages/bruno-app/src/themes/light/light-monochrome.js | head -120Repository: usebruno/bruno
Length of output: 3326
🏁 Script executed:
cat << 'EOF' > /tmp/check_contrast.py
from colorsys import rgb_to_hls, hls_to_rgb
def hex_to_rgb(hex_color):
hex_color = hex_color.lstrip('#')
return tuple(int(hex_color[i:i+2], 16) / 255.0 for i in (0, 2, 4))
def rgb_to_hex(rgb):
return '#{:02x}{:02x}{:02x}'.format(
int(rgb[0] * 255), int(rgb[1] * 255), int(rgb[2] * 255)
)
def apply_alpha(fg_rgb, alpha, bg_rgb=(1, 1, 1)):
"""Blend fg with alpha over bg (default white)"""
return tuple(fg * alpha + bg * (1 - alpha) for fg, bg in zip(fg_rgb, bg_rgb))
def relative_luminance(rgb):
"""Calculate relative luminance per WCAG"""
def adjust(c):
return c / 12.92 if c <= 0.03928 else ((c + 0.055) / 1.055) ** 2.4
r, g, b = [adjust(c) for c in rgb]
return 0.2126 * r + 0.7152 * g + 0.0722 * b
def contrast_ratio(lum1, lum2):
lighter = max(lum1, lum2)
darker = min(lum1, lum2)
return (lighter + 0.05) / (darker + 0.05)
# Status colors from palette.intent (actual values from file)
colors = {
'INFO': '#737373',
'SUCCESS': '#525252',
'WARNING': '#666666',
'DANGER': '#404040'
}
print("WCAG Contrast Ratios (AA requires 4.5:1 for normal text):\n")
for name, hex_color in colors.items():
text_rgb = hex_to_rgb(hex_color)
bg_rgb = apply_alpha(text_rgb, 0.15, (1, 1, 1)) # 15% opacity over white
text_lum = relative_luminance(text_rgb)
bg_lum = relative_luminance(bg_rgb)
ratio = contrast_ratio(text_lum, bg_lum)
status = "✓ PASS" if ratio >= 4.5 else "✗ FAIL"
print(f"{name:10} text:{hex_color} on bg:{rgb_to_hex(bg_rgb)} → {ratio:.2f}:1 {status}")
EOF
python3 /tmp/check_contrast.pyRepository: usebruno/bruno
Length of output: 144
🏁 Script executed:
python3 << 'EOF'
def hex_to_rgb(hex_color):
hex_color = hex_color.lstrip('#')
return tuple(int(hex_color[i:i+2], 16) / 255.0 for i in (0, 2, 4))
def relative_luminance(rgb):
def adjust(c):
return c / 12.92 if c <= 0.03928 else ((c + 0.055) / 1.055) ** 2.4
r, g, b = [adjust(c) for c in rgb]
return 0.2126 * r + 0.7152 * g + 0.0722 * b
def contrast_ratio(lum1, lum2):
lighter = max(lum1, lum2)
darker = min(lum1, lum2)
return (lighter + 0.05) / (darker + 0.05)
colors = {
'INFO': '#737373',
'SUCCESS': '#525252',
'WARNING': '#666666',
'DANGER': '#404040'
}
print("WCAG AA Contrast Check (requires 4.5:1 minimum):\n")
for name, hex_color in colors.items():
text_rgb = hex_to_rgb(hex_color)
bg_rgb = tuple(c * 0.15 + 1 * 0.85 for c in text_rgb)
text_lum = relative_luminance(text_rgb)
bg_lum = relative_luminance(bg_rgb)
ratio = contrast_ratio(text_lum, bg_lum)
status = "PASS" if ratio >= 4.5 else "FAIL"
print(f"{name:10} {ratio:.2f}:1 {status}")
EOFRepository: usebruno/bruno
Length of output: 199
Fix INFO status color contrast for WCAG AA compliance.
The INFO status color (#737373) has a contrast ratio of 3.94:1 against its 15% opacity background, failing the WCAG AA requirement of 4.5:1 for normal text. SUCCESS, WARNING, and DANGER colors meet the standard (6.21:1, 4.69:1, and 8.03:1 respectively).
Increase the saturation or darken the INFO color to meet accessibility requirements.
…nts for improved UI consistency
… enhance theme color definitions for status indicators
- Changed color references from theme.brand to theme.primary.text in various StyledWrapper components. - Added hover effects to enhance UI interactivity in CollectionSettings and FolderSettings. - Removed unnecessary margin and padding adjustments in several components for cleaner layout. - Improved accessibility by ensuring aria attributes are correctly set in MenuDropdown. - Standardized styling for method indicators in RequestPane components. These changes aim to create a more cohesive look and feel across the application while adhering to the updated theme guidelines.
- Changed modal size from "sm" to "md" in RenameWorkspace, CreateApiSpec, CloneCollection, DeleteCollectionItem, and RenameCollection components. - Improved styling in HttpMethodSelector by adding padding for better layout. - Updated theme color references in multiple theme files to use a new palette structure for consistency and maintainability.
…nents - Updated HttpMethodSelector to clarify padding calculation in comments. - Integrated theme colors for OAuth2 indicator and timestamp in TimelineItem for better visual consistency. - Adjusted Method component to use uppercase styling for method display. - Modified RelativeTime component to apply muted text color for improved readability. - Updated INFO color in dark and light themes for better contrast and accessibility.
5a6b4ff to
86b219c
Compare
- Cleaned up import statements in vscode.js and light-pastel.js by removing redundant lines for improved code clarity and maintainability.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
packages/bruno-app/src/components/ResponsePane/GrpcResponsePane/index.js (1)
3-3: Remove unused import.The
classnamesimport is no longer used after the change on line 144. Please remove it to keep the imports clean.🔎 Proposed fix
-import classnames from 'classnames';packages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/index.js (2)
14-71: Inefficient filtering: iterating over the wrong collection.You filter
itemsFailedLoadingon line 14, but then iterate over the fullflattenedItemsarray on line 60, re-applying the same filter condition on line 61. This duplicates the filtering logic and processes unnecessary items.🔎 Refactor to use the filtered array directly
- {flattenedItems?.map((item, index) => ( - item?.partial && !item?.loading ? ( - <tr key={index} className="cursor-pointer" onClick={handleRequestClick(item)}> + {itemsFailedLoading?.map((item, index) => ( + <tr key={index} className="cursor-pointer" onClick={handleRequestClick(item)}> - <td className="py-1.5 px-3"> - {item?.pathname?.split(`${collection?.pathname}/`)?.[1]} - </td> - <td className="py-1.5 px-3"> - {item?.size?.toFixed?.(2)} MB - </td> - </tr> - ) : null + <td className="py-1.5 px-3"> + {item?.pathname?.split(`${collection?.pathname}/`)?.[1]} + </td> + <td className="py-1.5 px-3"> + {item?.size?.toFixed?.(2)} MB + </td> + </tr> ))}
67-67: Unnecessary optional chaining before function arguments.The syntax
?.toFixed?.(2)is unusual. IftoFixedexists as a method, it can be called directly without the optional chaining operator before the arguments.🔎 Simplify optional chaining
- {item?.size?.toFixed?.(2)} MB + {item?.size?.toFixed(2)} MB
♻️ Duplicate comments (4)
packages/bruno-app/src/components/Modal/StyledWrapper.js (1)
130-137: Hardcoded SVG color should use theme prop.The SVG dropdown indicator uses a hardcoded color
%23999(#999) instead of a theme token. This issue was previously flagged and remains unresolved.Based on learnings, styled components should use theme props for colors rather than hardcoded values.
packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js (2)
23-23: Class name mismatch between JSX and StyledWrapper.The JSX uses
oauth-request-item-headerbut the StyledWrapper file still defines styles for.timeline-item-header. This means the styled-component rules won't apply to this element. Either revert the class name or update StyledWrapper.js to define matching styles.Based on learnings: Styled Components are used as wrappers to define both self and children components style.
28-28: Move inline color style to StyledWrapper.Line 28 applies
theme.colors.text.mutedvia inline style. Per project guidelines, color styling should be defined in the StyledWrapper using theme props, not as inline styles in JSX.🔎 Proposed refactor
Add to StyledWrapper.js:
.oauth-request-item-header { .oauth-label { color: ${(props) => props.theme.colors.text.muted}; } }Then update the JSX:
- {isOauth2 && <span className="text-xs flex-shrink-0" style={{ color: theme.colors.text.muted }}>[oauth2.0]</span>} + {isOauth2 && <span className="oauth-label text-xs flex-shrink-0">[oauth2.0]</span>}Based on learnings: Use styled component's theme prop to manage CSS colors, not inline styles.
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js (1)
39-46: This segment was already reviewed in previous commits.The redundant spread pattern,
toLocaleLowerCase()usage, and missing fallback were flagged in earlier reviews.
🧹 Nitpick comments (6)
packages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.js (1)
25-28: Consider using theme colors for caret.The caret uses hardcoded RGB values while the similar file
RequestPane/WsBody/BodyMode/StyledWrapper.js(lines 25-26) usestheme.colors.text.mutedfor the same purpose. Using theme colors ensures consistency and proper dark/light mode support.🔎 Proposed refactor to use theme colors
.caret { - color: rgb(140, 140, 140); - fill: rgb(140 140 140); + color: ${(props) => props.theme.colors.text.muted}; + fill: ${(props) => props.theme.colors.text.muted}; }packages/bruno-app/src/components/RequestTabs/index.js (1)
122-126: Refactor duplicated inline styles into StyledWrapper.The inline style
marginBottom: '3px'is repeated three times across the ActionIcon components. This magic number should be moved to the StyledWrapper for maintainability.🔎 Suggested refactor to eliminate inline style duplication
Move the ActionIcon styling to StyledWrapper:
// In StyledWrapper.js, add: + .flex.items-center ActionIcon { + margin-bottom: 3px; + }Then remove the inline styles from the ActionIcon components:
-<ActionIcon size="lg" onClick={leftSlide} aria-label="Left Chevron" style={{ marginBottom: '3px' }}> +<ActionIcon size="lg" onClick={leftSlide} aria-label="Left Chevron"> <IconChevronLeft size={18} strokeWidth={1.5} /> </ActionIcon>Apply the same change to lines 170 and 179.
Also applies to: 170-175, 178-182
packages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/index.js (2)
45-45: Consider adding ARIA attributes for the warning icon.The
IconAlertTriangleconveys important status information visually. Adding anaria-labelwould improve accessibility for screen reader users.🔎 Add aria-label
- <IconAlertTriangle size={16} className="warning-icon" /> + <IconAlertTriangle size={16} className="warning-icon" aria-label="Warning" />
62-62: Enhance keyboard accessibility for clickable table rows.Table rows with
onClickhandlers should support keyboard navigation. Consider addingtabIndex,role, and keyboard event handlers for better accessibility.🔎 Add keyboard support
- <tr key={index} className="cursor-pointer" onClick={handleRequestClick(item)}> + <tr + key={index} + className="cursor-pointer" + onClick={handleRequestClick(item)} + onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') handleRequestClick(item)(e); }} + tabIndex={0} + role="button" + >packages/bruno-app/src/ui/MenuDropdown/index.js (1)
422-432: LGTM! Accessibility improvement correctly implemented.The
aria-expandedattribute is properly added to both the cloned trigger element and the fallback div, ensuring screen readers can announce the dropdown state. React's automatic conversion of boolean values to ARIA string attributes ("true"/"false") works as expected here.Optional: Consider enhancing the fallback div for complete keyboard accessibility.
The fallback div on line 432 could benefit from
role="button"andtabIndex={0}to ensure it's keyboard-navigable and properly announced by assistive technology. However, since this fallback is only used whenchildrenis not a valid React element (which should be rare), this is purely optional polish.🔎 Optional enhancement for fallback div
- : <div onClick={handleTriggerClick} aria-expanded={isOpen} data-testid={testId}>{children}</div>; + : <div onClick={handleTriggerClick} onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); handleTriggerClick(); } }} role="button" tabIndex={0} aria-expanded={isOpen} data-testid={testId}>{children}</div>;packages/bruno-app/src/themes/light/light-pastel.js (1)
61-68: Consider consolidating the palette declaration.The pattern of exporting an empty object and then populating it works but is unconventional. Consider defining and exporting in a single statement for clarity.
🔎 Proposed refactor
-export const palette = {}; - -palette.intent = { +export const palette = { + intent: { - INFO: colors.BLUE, - SUCCESS: colors.GREEN, - WARNING: colors.ORANGE, - DANGER: colors.RED + INFO: colors.BLUE, + SUCCESS: colors.GREEN, + WARNING: colors.ORANGE, + DANGER: colors.RED + } };
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (93)
packages/bruno-app/src/components/BodyModeSelector/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/index.jspackages/bruno-app/src/components/CollectionSettings/Presets/index.jspackages/bruno-app/src/components/CollectionSettings/Script/index.jspackages/bruno-app/src/components/CollectionSettings/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Vars/index.jspackages/bruno-app/src/components/Cookies/ModifyCookieModal/StyledWrapper.jspackages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.jspackages/bruno-app/src/components/FolderSettings/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/FolderSettings/Documentation/index.jspackages/bruno-app/src/components/FolderSettings/Script/index.jspackages/bruno-app/src/components/FolderSettings/StyledWrapper.jspackages/bruno-app/src/components/FolderSettings/Vars/index.jspackages/bruno-app/src/components/ManageWorkspace/RenameWorkspace/index.jspackages/bruno-app/src/components/Modal/StyledWrapper.jspackages/bruno-app/src/components/Preferences/General/index.jspackages/bruno-app/src/components/RequestPane/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Auth/OAuth2/GrantTypeSelector/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Auth/index.jspackages/bruno-app/src/components/RequestPane/GraphQLRequestPane/index.jspackages/bruno-app/src/components/RequestPane/GrpcBody/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/GrpcQueryUrl/index.jspackages/bruno-app/src/components/RequestPane/GrpcRequestPane/GrpcAuth/index.jspackages/bruno-app/src/components/RequestPane/GrpcRequestPane/index.jspackages/bruno-app/src/components/RequestPane/HttpRequestPane/index.jspackages/bruno-app/src/components/RequestPane/QueryParams/index.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/components/RequestPane/RequestBody/RequestBodyMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/Script/index.jspackages/bruno-app/src/components/RequestPane/Vars/index.jspackages/bruno-app/src/components/RequestPane/WSRequestPane/WSAuth/index.jspackages/bruno-app/src/components/RequestPane/WSRequestPane/index.jspackages/bruno-app/src/components/RequestPane/WSSettingsPane/index.jspackages/bruno-app/src/components/RequestPane/WsBody/BodyMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/WsQueryUrl/index.jspackages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmCollectionClose/index.jspackages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmFolderClose/index.jspackages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmRequestClose/index.jspackages/bruno-app/src/components/RequestTabs/RequestTab/SpecialTab.jspackages/bruno-app/src/components/RequestTabs/StyledWrapper.jspackages/bruno-app/src/components/RequestTabs/index.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/ResponseExampleBody/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/GrpcResponsePane/GrpcQueryResult/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/GrpcResponsePane/index.jspackages/bruno-app/src/components/ResponsePane/Overlay/index.jspackages/bruno-app/src/components/ResponsePane/ResponsePaneActions/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Time/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.jspackages/bruno-app/src/components/ResponsePane/WsResponsePane/WSMessagesList/index.jspackages/bruno-app/src/components/ResponsePane/WsResponsePane/index.jspackages/bruno-app/src/components/ResponsePane/index.jspackages/bruno-app/src/components/Sidebar/ApiSpecs/CreateApiSpec/index.jspackages/bruno-app/src/components/Sidebar/Collections/Collection/CloneCollection/index.jspackages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/DeleteCollectionItem/index.jspackages/bruno-app/src/components/Sidebar/Collections/Collection/RenameCollection/index.jspackages/bruno-app/src/components/Sidebar/Collections/CollectionSearch/StyledWrapper.jspackages/bruno-app/src/components/Sidebar/CreateCollection/index.jspackages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.jspackages/bruno-app/src/components/Sidebar/NewRequest/index.jspackages/bruno-app/src/providers/App/ConfirmAppClose/SaveRequestsModal.jspackages/bruno-app/src/themes/dark/catppuccin-frappe.jspackages/bruno-app/src/themes/dark/catppuccin-macchiato.jspackages/bruno-app/src/themes/dark/catppuccin-mocha.jspackages/bruno-app/src/themes/dark/dark-monochrome.jspackages/bruno-app/src/themes/dark/dark-pastel.jspackages/bruno-app/src/themes/dark/dark.jspackages/bruno-app/src/themes/dark/nord.jspackages/bruno-app/src/themes/dark/vscode.jspackages/bruno-app/src/themes/light/catppuccin-latte.jspackages/bruno-app/src/themes/light/light-monochrome.jspackages/bruno-app/src/themes/light/light-pastel.jspackages/bruno-app/src/themes/light/light.jspackages/bruno-app/src/themes/light/vscode.jspackages/bruno-app/src/themes/schema/oss.jspackages/bruno-app/src/ui/MenuDropdown/index.jspackages/bruno-app/src/ui/ResponsiveTabs/StyledWrapper.jstests/collection/create/create-collection.spec.tstests/collection/moving-requests/tag-persistence.spec.tstests/collection/moving-tabs/move-tabs.spec.tstests/preferences/default-collection-location/default-collection-location.spec.jstests/request/encoding/curl-encoding.spec.tstests/request/newlines/newlines-persistence.spec.tstests/request/save/save.spec.tstests/utils/page/actions.ts
💤 Files with no reviewable changes (1)
- packages/bruno-app/src/components/ResponsePane/GrpcResponsePane/GrpcQueryResult/StyledWrapper.js
✅ Files skipped from review due to trivial changes (1)
- packages/bruno-app/src/components/CollectionSettings/StyledWrapper.js
🚧 Files skipped from review as they are similar to previous changes (61)
- packages/bruno-app/src/components/RequestPane/GrpcRequestPane/GrpcAuth/index.js
- packages/bruno-app/src/components/RequestPane/Script/index.js
- packages/bruno-app/src/components/Preferences/General/index.js
- packages/bruno-app/src/themes/schema/oss.js
- packages/bruno-app/src/components/RequestTabs/RequestTab/SpecialTab.js
- packages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/StyledWrapper.js
- packages/bruno-app/src/components/ResponsePane/WsResponsePane/WSMessagesList/index.js
- packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/DeleteCollectionItem/index.js
- packages/bruno-app/src/components/RequestPane/WSSettingsPane/index.js
- packages/bruno-app/src/components/RequestPane/RequestBody/RequestBodyMode/StyledWrapper.js
- packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/index.js
- packages/bruno-app/src/components/RequestPane/WsQueryUrl/index.js
- packages/bruno-app/src/components/FolderSettings/Vars/index.js
- packages/bruno-app/src/components/ManageWorkspace/RenameWorkspace/index.js
- packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Time/index.js
- packages/bruno-app/src/themes/light/catppuccin-latte.js
- packages/bruno-app/src/ui/ResponsiveTabs/StyledWrapper.js
- packages/bruno-app/src/components/FolderSettings/Script/index.js
- packages/bruno-app/src/components/FolderSettings/StyledWrapper.js
- packages/bruno-app/src/themes/dark/catppuccin-macchiato.js
- packages/bruno-app/src/themes/dark/dark-pastel.js
- packages/bruno-app/src/components/RequestPane/GraphQLRequestPane/index.js
- packages/bruno-app/src/themes/dark/catppuccin-mocha.js
- tests/utils/page/actions.ts
- packages/bruno-app/src/themes/dark/nord.js
- packages/bruno-app/src/components/FolderSettings/Documentation/index.js
- packages/bruno-app/src/components/RequestPane/Auth/index.js
- packages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmFolderClose/index.js
- packages/bruno-app/src/components/RequestPane/WSRequestPane/WSAuth/index.js
- packages/bruno-app/src/components/RequestPane/GrpcQueryUrl/index.js
- packages/bruno-app/src/themes/light/vscode.js
- packages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmCollectionClose/index.js
- tests/collection/moving-requests/tag-persistence.spec.ts
- packages/bruno-app/src/components/RequestPane/HttpRequestPane/index.js
- tests/request/newlines/newlines-persistence.spec.ts
- packages/bruno-app/src/components/RequestPane/Auth/AuthMode/StyledWrapper.js
- packages/bruno-app/src/components/Sidebar/ApiSpecs/CreateApiSpec/index.js
- packages/bruno-app/src/components/CollectionSettings/Script/index.js
- packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.js
- packages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/StyledWrapper.js
- packages/bruno-app/src/components/RequestTabs/RequestTab/ConfirmRequestClose/index.js
- packages/bruno-app/src/components/RequestPane/Auth/OAuth2/GrantTypeSelector/StyledWrapper.js
- tests/request/save/save.spec.ts
- packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/StyledWrapper.js
- packages/bruno-app/src/components/CollectionSettings/Vars/index.js
- tests/preferences/default-collection-location/default-collection-location.spec.js
- packages/bruno-app/src/components/RequestPane/GrpcBody/StyledWrapper.js
- packages/bruno-app/src/components/Sidebar/NewRequest/index.js
- packages/bruno-app/src/components/BodyModeSelector/StyledWrapper.js
- packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js
- packages/bruno-app/src/components/ResponsePane/Overlay/index.js
- packages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/ResponseExampleBody/StyledWrapper.js
- packages/bruno-app/src/components/CollectionSettings/Presets/index.js
- packages/bruno-app/src/components/Cookies/ModifyCookieModal/StyledWrapper.js
- packages/bruno-app/src/themes/dark/catppuccin-frappe.js
- packages/bruno-app/src/components/Sidebar/CreateCollection/index.js
- packages/bruno-app/src/components/Sidebar/Collections/CollectionSearch/StyledWrapper.js
- packages/bruno-app/src/components/RequestTabs/StyledWrapper.js
- packages/bruno-app/src/components/ResponsePane/index.js
- packages/bruno-app/src/components/ResponsePane/WsResponsePane/index.js
- packages/bruno-app/src/providers/App/ConfirmAppClose/SaveRequestsModal.js
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions.() => {}is good
No space between function name and parentheses.func()notfunc ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly
Files:
packages/bruno-app/src/components/RequestTabs/index.jspackages/bruno-app/src/components/RequestPane/QueryParams/index.jspackages/bruno-app/src/components/RequestPane/Vars/index.jspackages/bruno-app/src/components/Sidebar/Collections/Collection/CloneCollection/index.jspackages/bruno-app/src/components/ResponsePane/GrpcResponsePane/index.jspackages/bruno-app/src/components/Sidebar/Collections/Collection/RenameCollection/index.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/WSRequestPane/index.jspackages/bruno-app/src/components/FolderSettings/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.jspackages/bruno-app/src/components/Modal/StyledWrapper.jspackages/bruno-app/src/themes/light/light.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/StyledWrapper.jstests/collection/moving-tabs/move-tabs.spec.tspackages/bruno-app/src/components/RequestPane/WsBody/BodyMode/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/GrpcRequestPane/index.jstests/request/encoding/curl-encoding.spec.tspackages/bruno-app/src/themes/light/light-pastel.jstests/collection/create/create-collection.spec.tspackages/bruno-app/src/themes/dark/dark.jspackages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.jspackages/bruno-app/src/ui/MenuDropdown/index.jspackages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.jspackages/bruno-app/src/themes/light/light-monochrome.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/StyledWrapper.jspackages/bruno-app/src/themes/dark/dark-monochrome.jspackages/bruno-app/src/themes/dark/vscode.js
tests/**/**.*
⚙️ CodeRabbit configuration file
tests/**/**.*: Review the following e2e test code written using the Playwright test library. Ensure that:
Follow best practices for Playwright code and e2e automation
Try to reduce usage of
page.waitForTimeout();in code unless absolutely necessary and the locator cannot be found using existingexpect()playwright callsAvoid using
page.pause()in codeUse locator variables for locators
Avoid using test.only
Use multiple assertions
Promote the use of
test.stepas much as possible so the generated reports are easier to readEnsure that the
fixtureslike the collections are nested inside thefixturesfolderFixture Example*: Here's an example of possible fixture and test pair
. ├── fixtures │ └── collection │ ├── base.bru │ ├── bruno.json │ ├── collection.bru │ ├── ws-test-request-with-headers.bru │ ├── ws-test-request-with-subproto.bru │ └── ws-test-request.bru ├── connection.spec.ts # <- Depends on the collection in ./fixtures/collection ├── headers.spec.ts ├── persistence.spec.ts ├── variable-interpolation │ ├── fixtures │ │ └── collection │ │ ├── environments │ │ ├── bruno.json │ │ └── ws-interpolation-test.bru │ ├── init-user-data │ └── variable-interpolation.spec.ts # <- Depends on the collection in ./variable-interpolation/fixtures/collection └── subproto.spec.ts
Files:
tests/collection/moving-tabs/move-tabs.spec.tstests/request/encoding/curl-encoding.spec.tstests/collection/create/create-collection.spec.ts
🧠 Learnings (5)
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.
Applied to files:
packages/bruno-app/src/components/RequestTabs/index.jspackages/bruno-app/src/components/RequestPane/QueryParams/index.jspackages/bruno-app/src/components/RequestPane/Vars/index.jspackages/bruno-app/src/components/Sidebar/Collections/Collection/CloneCollection/index.jspackages/bruno-app/src/components/ResponsePane/GrpcResponsePane/index.jspackages/bruno-app/src/components/Sidebar/Collections/Collection/RenameCollection/index.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/WSRequestPane/index.jspackages/bruno-app/src/components/FolderSettings/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.jspackages/bruno-app/src/components/Modal/StyledWrapper.jspackages/bruno-app/src/themes/light/light.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/WsBody/BodyMode/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/GrpcRequestPane/index.jspackages/bruno-app/src/themes/light/light-pastel.jspackages/bruno-app/src/themes/dark/dark.jspackages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.jspackages/bruno-app/src/ui/MenuDropdown/index.jspackages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/index.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.jspackages/bruno-app/src/themes/light/light-monochrome.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/StyledWrapper.jspackages/bruno-app/src/themes/dark/dark-monochrome.jspackages/bruno-app/src/themes/dark/vscode.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Use styled component's theme prop to manage CSS colors and not CSS variables when in the context of a styled component or any React component using the styled component
Applied to files:
packages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.jspackages/bruno-app/src/components/FolderSettings/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.jspackages/bruno-app/src/components/Modal/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/WsBody/BodyMode/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/themes/light/light-pastel.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.jspackages/bruno-app/src/themes/light/light-monochrome.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/StyledWrapper.jspackages/bruno-app/src/themes/dark/dark-monochrome.jspackages/bruno-app/src/themes/dark/vscode.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Component CSS might also change layout but Tailwind classes shouldn't define colors
Applied to files:
packages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.jspackages/bruno-app/src/components/FolderSettings/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.jspackages/bruno-app/src/components/Modal/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/WsBody/BodyMode/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Components are used as wrappers to define both self and children components style; Tailwind classes are used specifically for layout based styles
Applied to files:
packages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.jspackages/bruno-app/src/components/Modal/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/WsBody/BodyMode/StyledWrapper.jspackages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/StyledWrapper.jspackages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.jspackages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/StyledWrapper.js
📚 Learning: 2025-12-16T07:16:23.647Z
Learnt from: sanish-bruno
Repo: usebruno/bruno PR: 6090
File: tests/scripting/hooks/init-user-data/ui-state-snapshot.json:1-8
Timestamp: 2025-12-16T07:16:23.647Z
Learning: For e2e tests in the bruno repository: Collections that are shared between CLI and UI tests (comprehensive test suites testing core functionality) should be placed in `packages/bruno-tests/` to avoid duplication. The `tests/**/fixtures/collection` pattern should be used for test-specific collections that test particular UI behaviors or are specific to a single test file.
Applied to files:
tests/collection/moving-tabs/move-tabs.spec.tstests/request/encoding/curl-encoding.spec.tstests/collection/create/create-collection.spec.ts
🧬 Code graph analysis (7)
packages/bruno-app/src/components/Sidebar/Collections/Collection/CloneCollection/index.js (1)
packages/bruno-app/src/components/Modal/index.js (1)
Modal(62-171)
packages/bruno-app/src/components/Sidebar/Collections/Collection/RenameCollection/index.js (1)
packages/bruno-app/src/components/Modal/index.js (1)
Modal(62-171)
packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js (3)
packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.js (2)
useTheme(5-5)Method(4-17)packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Time/index.js (3)
useTheme(27-27)RelativeTime(25-48)RelativeTime(25-48)packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Status/index.js (2)
useTheme(4-4)Status(3-21)
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js (3)
packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.js (2)
useTheme(5-5)methodColor(7-10)packages/bruno-app/src/components/RequestPane/QueryParams/index.js (1)
useTheme(19-19)packages/bruno-app/src/components/RequestPane/QueryUrl/index.js (2)
useTheme(28-28)method(30-30)
tests/collection/moving-tabs/move-tabs.spec.ts (2)
tests/utils/page/actions.ts (1)
createCollection(854-854)packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js (2)
createCollection(2347-2367)createCollection(2347-2367)
tests/collection/create/create-collection.spec.ts (1)
tests/utils/page/actions.ts (1)
createCollection(854-854)
packages/bruno-app/src/themes/light/light-monochrome.js (8)
packages/bruno-app/src/themes/dark/dark-monochrome.js (2)
palette(41-41)palette(41-41)packages/bruno-app/src/themes/dark/catppuccin-frappe.js (2)
palette(54-54)palette(54-54)packages/bruno-app/src/themes/dark/catppuccin-macchiato.js (2)
palette(54-54)palette(54-54)packages/bruno-app/src/themes/dark/catppuccin-mocha.js (2)
palette(54-54)palette(54-54)packages/bruno-app/src/themes/dark/dark-pastel.js (2)
palette(62-62)palette(62-62)packages/bruno-app/src/themes/dark/nord.js (2)
palette(61-61)palette(61-61)packages/bruno-app/src/themes/dark/vscode.js (2)
palette(65-65)palette(65-65)packages/bruno-app/src/themes/light/catppuccin-latte.js (2)
palette(54-54)palette(54-54)
🪛 Biome (2.1.2)
packages/bruno-app/src/themes/light/light-pastel.js
[error] 8-8: Shouldn't redeclare 'rgba'. Consider to delete it or rename it.
'rgba' is defined here:
(lint/suspicious/noRedeclare)
packages/bruno-app/src/themes/dark/vscode.js
[error] 5-5: Shouldn't redeclare 'rgba'. Consider to delete it or rename it.
'rgba' is defined here:
(lint/suspicious/noRedeclare)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: SSL Tests - Windows
- GitHub Check: SSL Tests - Linux
- GitHub Check: SSL Tests - macOS
- GitHub Check: Playwright E2E Tests
- GitHub Check: Unit Tests
- GitHub Check: CLI Tests
🔇 Additional comments (41)
packages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/StyledWrapper.js (1)
10-10: LGTM! Theme alignment.The color update from
theme.brandtotheme.primary.textaligns with the PR's theme standardization effort and correctly uses the theme prop per project standards.packages/bruno-app/src/components/FolderSettings/AuthMode/StyledWrapper.js (1)
10-10: LGTM! Consistent theme update.The color change from
theme.brandtotheme.primary.textmatches the theme alignment pattern across the PR and adheres to project styling standards.packages/bruno-app/src/components/RequestPane/QueryParams/index.js (1)
138-138: LGTM – Margin removal aligns with PR goals.The removal of
mt-2tightens the layout as intended by this UI update PR.packages/bruno-app/src/components/RequestPane/Vars/index.js (2)
12-12: Inconsistent AI summary; verify layout behavior.The AI summary states the className changed from
"flex-1 mt-2"to"flex-1", but the actual code shows the className attribute was removed entirely. This is a discrepancy.Additionally, removing the
flex-1class changes the flex behavior—this div will no longer grow to fill available space in the flex container. Since the parent usesflex flex-col, both child sections will now only occupy their natural height. Please verify this doesn't cause layout issues or unintended visual changes in the UI.
12-15: Margin removal aligns with PR objectives.Removing the
mt-2class is consistent with the PR goal of eliminating unnecessary margins for a cleaner layout.packages/bruno-app/src/components/Modal/StyledWrapper.js (1)
180-183: LGTM! Proper theme usage for radio inputs.The radio input styling correctly uses
theme.primary.solidfor the accent color and addscursor: pointerfor better UX.packages/bruno-app/src/components/RequestPane/WSRequestPane/index.js (1)
108-110: LGTM – Clean simplification of margin logic.Removing the conditional
isMultipleContentTabcheck and standardizing onmt-4reduces complexity and aligns with the PR's goal of consistent spacing across RequestPane variants.Please verify that the fixed top margin works well across all usage scenarios for this component.
packages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.js (1)
36-36: LGTM—formatting cleanup.Removing the extraneous blank line tightens up the styling block without affecting functionality.
packages/bruno-app/src/components/ResponsePane/GrpcResponsePane/index.js (1)
144-144: Verify timeline tab layout with the new margin.The conditional margin logic has been removed, so
mt-4now applies unconditionally—including when the timeline tab is active. Previously, the timeline tab had no top margin.Please verify that the timeline tab's layout appears as intended with this spacing change.
packages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/StyledWrapper.js (1)
20-22: LGTM! Theme token updated correctly.The change from
theme.brandtotheme.primary.textaligns with the PR's theme standardization goals and properly uses the theme prop for color management.Based on learnings, styled components should use theme prop for colors.
packages/bruno-app/src/components/RequestPane/WsBody/BodyMode/StyledWrapper.js (1)
19-21: LGTM! Theme token updated correctly.The change from
theme.brandtotheme.primary.textis consistent with the PR's theme standardization effort and properly leverages the theme system.packages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/StyledWrapper.js (1)
22-24: LGTM! Hover state improves UX.Adding the hover state provides better visual feedback for interactive tabs. The implementation properly uses the theme system with
theme.tabs.active.color, maintaining consistency with the active state styling.packages/bruno-app/src/components/RequestTabs/index.js (2)
15-15: LGTM – ActionIcon import added correctly.Clean addition of the ActionIcon component import.
120-120: LGTM – Flex layout update looks good.The flex container with gap spacing provides cleaner layout management for the tab controls.
packages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/index.js (1)
44-45: Styling updates look good.The shift to using the generic
warning-iconclass and removing explicit background/text color classes aligns with the PR's goal of standardizing theme usage. Styling is now properly managed in StyledWrapper.packages/bruno-app/src/components/Sidebar/Collections/Collection/CloneCollection/index.js (1)
88-88: LGTM! Modal size increase is appropriate.The change to
size="md"is well-suited for this form, which contains multiple fields, interactive elements, and help text. This aligns with the PR's UI standardization goals.packages/bruno-app/src/components/Sidebar/Collections/Collection/RenameCollection/index.js (1)
45-45: LGTM! Consistent with modal standardization.The change to
size="md"maintains consistency with other modals in this PR, even though this form has only a single field. The standardization provides a more uniform user experience across the application.tests/collection/create/create-collection.spec.ts (1)
2-2: LGTM! Clean refactor to use the helper.The replacement of the manual UI flow with
createCollection()reduces duplication and improves maintainability across the test suite. The import is correct and the helper usage is appropriate.Also applies to: 14-14
tests/collection/moving-tabs/move-tabs.spec.ts (1)
2-2: LGTM! Consistent refactor across both test cases.Both tests now use the
createCollection()helper to streamline the setup phase. The import update and helper usage are correct, reducing boilerplate while preserving the core tab manipulation logic.Also applies to: 12-12, 90-90
tests/request/encoding/curl-encoding.spec.ts (1)
2-2: LGTM! Refactor with helpful comments.The transition to
createCollection()is clean and consistent with the broader test suite refactor. The added comments clearly delineate the setup phase, improving test readability.Also applies to: 24-26, 55-57
packages/bruno-app/src/components/ResponsePane/Timeline/StyledWrapper.js (2)
13-15: LGTM! Theme token usage is correct.The
.timeline-itemborder styling now usestheme.border.border1, which correctly leverages the theme system for consistent border colors across the UI.
71-71: Whitespace adjustments are fine.The blank line additions improve readability without affecting functionality.
Also applies to: 132-132
packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/StyledWrapper.js (1)
6-6: LGTM! Border styling migrated to theme tokens.The border styles now use
theme.border.border1instead of hardcoded rgba values, which ensures consistency with the design system. The reduction from 2px to 1px also aligns with the lighter visual treatment indicated in the PR objectives.Also applies to: 10-10
packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/index.js (2)
2-2: LGTM! Theme hook integration is correct.The
useThemeimport and usage pattern follows the project's standard approach for accessing theme data in components.Also applies to: 12-12
23-35: Header restructure looks good overall.The new layout effectively groups Status, Method, URL, and the optional oauth2 label in a more compact presentation. The timestamp placement on the right is a logical improvement.
packages/bruno-app/src/components/RequestPane/GrpcRequestPane/index.js (1)
110-112: Refactoring confirmed complete—good simplification.Removing the conditional
isMultipleContentTablogic and standardizing tomt-4is consistent across all RequestPane components (HttpRequestPane, GraphQLRequestPane, WSRequestPane). No orphaned references remain. The change is clean and follows the established pattern.packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js (5)
12-30: LGTM: Clean ref forwarding and styling separation.The
methodSpanRefprop enables width synchronization, and moving color styling to the parent improves maintainability.
36-37: LGTM: Appropriate state and ref for width tracking.
76-79: LGTM: Smart width preservation for smooth mode transitions.Capturing the method span width before switching to custom mode prevents jarring layout shifts.
139-160: LGTM: Dynamic width calculation is well-implemented.The content-based width with
chunits, combined with thepreviousMethodWidthminimum, provides a smooth transition. The padding calculation correctly accounts forpx-2(1rem total).
149-182: LGTM: Consistent color application across both modes.The color styling is now centralized at the container level, and the ref forwarding enables the width synchronization feature.
packages/bruno-app/src/themes/dark/dark.js (2)
59-64: LGTM! Clean semantic color mapping.The intent palette provides a consistent semantic API for status colors across the theme.
122-143: LGTM! Status theming structure is well-designed.The status block provides a unified API for status indicators with appropriate visual hierarchy (15% opacity backgrounds ensure readability).
packages/bruno-app/src/themes/dark/dark-monochrome.js (2)
41-48: LGTM! Monochrome status colors are appropriate.The grayscale values maintain visual hierarchy while respecting the monochrome constraint.
77-98: LGTM! Status block implementation is consistent.packages/bruno-app/src/themes/dark/vscode.js (2)
65-72: LGTM! Intent mapping aligns with VS Code theme colors.
101-122: LGTM! Status block follows the established pattern.packages/bruno-app/src/themes/light/light.js (1)
114-135: LGTM! Status block completes the theme's semantic color API.packages/bruno-app/src/themes/light/light-monochrome.js (2)
42-49: LGTM! Status colors are now distinct.The INFO and SUCCESS colors are properly differentiated, addressing the previous concern about semantic distinction.
78-99: LGTM! Status block implementation is consistent with the theme pattern.packages/bruno-app/src/themes/light/light-pastel.js (1)
97-118: LGTM!The status configuration is well-structured and correctly applies the semantic color mappings from
palette.intentwith appropriate opacity for backgrounds.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/bruno-app/src/themes/dark/vscode.js (1)
64-71: Consider exporting a fully-formed object for consistency.The current pattern of exporting an empty object and then mutating it works but differs from the pattern used in other theme files. For consistency with
dark.jsand JavaScript best practices, export the complete object.🔎 Proposed refactor
-export const palette = {}; - -palette.intent = { - INFO: colors.BLUE, - SUCCESS: colors.GREEN, - WARNING: colors.ORANGE, - DANGER: colors.RED +export const palette = { + intent: { + INFO: colors.BLUE, + SUCCESS: colors.GREEN, + WARNING: colors.ORANGE, + DANGER: colors.RED + } };packages/bruno-app/src/themes/light/light-pastel.js (1)
59-66: Consider consolidating palette initialization.The pattern of creating an empty object and then mutating it works but could be more declarative. A single initialization would be cleaner and follows immutability principles.
🔎 Proposed refactor
-export const palette = {}; - -palette.intent = { +export const palette = { + intent: { - INFO: colors.BLUE, - SUCCESS: colors.GREEN, - WARNING: colors.ORANGE, - DANGER: colors.RED + INFO: colors.BLUE, + SUCCESS: colors.GREEN, + WARNING: colors.ORANGE, + DANGER: colors.RED + } };
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/bruno-app/src/themes/dark/vscode.jspackages/bruno-app/src/themes/light/light-pastel.js
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions.() => {}is good
No space between function name and parentheses.func()notfunc ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly
Files:
packages/bruno-app/src/themes/dark/vscode.jspackages/bruno-app/src/themes/light/light-pastel.js
🧠 Learnings (2)
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Use styled component's theme prop to manage CSS colors and not CSS variables when in the context of a styled component or any React component using the styled component
Applied to files:
packages/bruno-app/src/themes/dark/vscode.jspackages/bruno-app/src/themes/light/light-pastel.js
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.
Applied to files:
packages/bruno-app/src/themes/dark/vscode.jspackages/bruno-app/src/themes/light/light-pastel.js
🧬 Code graph analysis (1)
packages/bruno-app/src/themes/dark/vscode.js (2)
packages/bruno-app/src/themes/dark/dark.js (3)
palette(3-57)palette(3-57)colors(88-93)packages/bruno-app/src/themes/light/vscode.js (1)
colors(5-61)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: SSL Tests - macOS
- GitHub Check: Playwright E2E Tests
- GitHub Check: Unit Tests
- GitHub Check: SSL Tests - Linux
- GitHub Check: CLI Tests
- GitHub Check: SSL Tests - Windows
🔇 Additional comments (2)
packages/bruno-app/src/themes/dark/vscode.js (1)
100-121: LGTM!The status section is well-structured and follows the semantic color pattern consistently across all four status types. The use of
rgba()with the palette intent colors provides appropriate visual emphasis while maintaining theme consistency.packages/bruno-app/src/themes/light/light-pastel.js (1)
95-116: Status section styling looks good.The rgba usage is correct for polished v4.3.1—it properly accepts color strings and opacity values as shown here. The structure is consistent and aligns well with the PR's semantic status styling goals.
- Added accent color and cursor style for checkbox inputs in Modal's StyledWrapper. - Updated border-radius values in HttpMethodSelector and NewRequest StyledWrapper components to use theme variables for consistency. - Introduced a new textbox class in NewRequest StyledWrapper for better styling control. - Changed modal size from "sm" to "md" in CreateEnvironment for improved layout.
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (1)
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js (1)
41-47: Outstanding issues from prior review remain unaddressed.Three issues flagged previously:
- Redundant spread:
{...theme.request.methods, ...theme.request}merges unnecessary properties. Usetheme.request.methodsdirectly.- No fallback: Custom methods like
PROPFINDreturnundefined. Add a fallback color.- Locale-independent: Prefer
toLowerCase()overtoLocaleLowerCase()for ASCII HTTP verbs.🔎 Suggested fix
const methodColor = useMemo(() => { - const colorMap = { - ...theme.request.methods, - ...theme.request - }; - return colorMap[method.toLocaleLowerCase()]; + return theme.request.methods[method.toLowerCase()] ?? theme.colors?.text ?? 'inherit'; }, [method, theme]);
🧹 Nitpick comments (1)
packages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.js (1)
31-34: Consider removing!importantdeclarations.The
.textboxclass uses!importanton bothborder-radiusandheight, which typically indicates specificity conflicts with other styles. While this works, it can make the stylesheet harder to maintain.Consider investigating whether the specificity issue can be resolved by:
- Increasing the selector specificity naturally (e.g., chaining classes or using descendant selectors)
- Addressing the competing styles at their source
- Ensuring this class is applied at the appropriate DOM level
If
!importantis genuinely needed here (e.g., overriding third-party styles), consider adding a brief comment explaining why.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
packages/bruno-app/src/components/Modal/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/StyledWrapper.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.jspackages/bruno-app/src/components/WorkspaceHome/WorkspaceEnvironments/CreateEnvironment/index.js
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/bruno-app/src/components/Modal/StyledWrapper.js
- packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/StyledWrapper.js
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions.() => {}is good
No space between function name and parentheses.func()notfunc ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly
Files:
packages/bruno-app/src/components/WorkspaceHome/WorkspaceEnvironments/CreateEnvironment/index.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.js
🧠 Learnings (3)
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.
Applied to files:
packages/bruno-app/src/components/WorkspaceHome/WorkspaceEnvironments/CreateEnvironment/index.jspackages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.jspackages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Components are used as wrappers to define both self and children components style; Tailwind classes are used specifically for layout based styles
Applied to files:
packages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Component CSS might also change layout but Tailwind classes shouldn't define colors
Applied to files:
packages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.js
🧬 Code graph analysis (1)
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js (1)
packages/bruno-app/src/components/ResponsePane/Timeline/TimelineItem/Common/Method/index.js (1)
useTheme(5-5)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: SSL Tests - Windows
- GitHub Check: SSL Tests - macOS
- GitHub Check: SSL Tests - Linux
- GitHub Check: CLI Tests
- GitHub Check: Unit Tests
- GitHub Check: Playwright E2E Tests
🔇 Additional comments (6)
packages/bruno-app/src/components/WorkspaceHome/WorkspaceEnvironments/CreateEnvironment/index.js (1)
64-64: LGTM! Modal size update improves form layout.The change from "sm" to "md" provides better spacing for the environment name input form, consistent with the broader UI refresh.
packages/bruno-app/src/components/RequestPane/QueryUrl/HttpMethodSelector/index.js (4)
13-31: LGTM!Clean prop forwarding with
methodSpanReffor width synchronization. The ref-based approach for measuring the method span is appropriate.
76-88: LGTM!Solid approach to capture the span width before switching to custom mode. This prevents layout jank when the user enters a shorter custom method.
139-172: LGTM!Width calculations are now consistent. The
px-2class provides 1rem total horizontal padding, which matches the+ 1remin the calc. The clamping logic and fallback forminWidthPxhandle edge cases well.
175-187: LGTM!Standard rendering path is clean. The
methodSpanRefis correctly passed to enable width synchronization when switching to custom mode.packages/bruno-app/src/components/Sidebar/NewRequest/StyledWrapper.js (1)
8-9: Good theme standardization.Replacing hard-coded
3pxvalues withtheme.border.radius.baseimproves consistency and maintainability across the application.theme.border.radius.baseis properly defined as6pxacross all themes.Also applies to: 18-19
* fix: use themes within protobuf section (#6575) * fix: use themes within protobuf section * chore: fix font weight for protobuf settings --------- Co-authored-by: Bijin A B <[email protected]> * fix: radios buttons to use primary color (#6576) * fix: cookie modal theme (#6580) * fix: cookie modal theme * update toggle switch to use primary color * style: enhance theme dropdown and security settings with improved styles and active indicators (#6582) * style: enhance CodeMirror dropdown styles with theme integration (#6577) * style: enhance CodeMirror dropdown styles with theme integration for improved consistency * style: refine dropdown and CodeMirror hint styles for improved consistency and usability * style: clean up scrollbar and CodeMirror hint styles for improved readability * remove max height for keybinding table (#6586) * fix: Add New Request CTA alignment in tabs (#6584) * fix: Add New Request CTA alignment in tabs - Moved the '+' icon before the chevron to maintain alignment once chevrons appear - Added padding to the '+' icon for better spacing. * refactor: streamline New Request button rendering in RequestTabs component - Simplified the rendering logic for the New Request button by removing unnecessary conditional wrappers. - Ensured the button remains functional and maintains its styling within the tab layout. * chore: update delete confirmation modals to use danger button color (#6589) * refactor: remove size prop from Button components for consistency across modals and improve styling * style: update confirm button colors in modal components for consistency * fix: oauth2 callback url field placeholder text update (#6588) * Fix auth panel UI updates (#6590) * style: update padding and font size in OAuth2 and Table components for improved consistency * style: update font styles in OAuth2 components for improved readability * fix: add missing semicolon in StyledWrapper.js for consistent styling * fix: standardize table border colors and improve table styling (#6597) * style: update OAuth2 section labels for improved consistency and readability (#6598) * fix: prefrence modal width (#6595) * fix: theme within grpc timeline (#6581) * fix: theme within grpc timeline * fix: use font from the theme * remove y padding to make timeline item more compact * fix: font * fix: padding * fix: use fira code * fix: icon spacing * add border to the method search * show bg for message section within request * fix: collection already opened in other workspace (#6574) * fix: collection already opened in other workspace * fix * fixes * Merge pull request #6583 from naman-bruno/add/collection-docs add: collection-docs * add: beta tag for opencollection & fix create collection location behaviour (#6594) * add: beta tag for opencollection * fixes * fix * feat: improved dark mode color (#6616) * fix: resolve request pane tooltip visibility issue (#6615) * Feat/update file picker (#6614) * styling: file-picker editor component * use filepicker component within filebody and response example filebody * edit example to use button components * fix: hide delete, disable checkbox in preview mode * make label italic * chore: change example cta buttons to filled style --------- Co-authored-by: Bijin A B <[email protected]> * fix: folder docs save button visibility issue (#6617) * refactor: improve theme handling in ThemeProvider for better responsiveness to system preferences (#6606) * refactor: improve theme handling in ThemeProvider for better responsiveness to system preferences - Introduced helper functions to determine effective theme and apply it to the root element. - Updated theme application logic to respond to system theme changes more efficiently. - Simplified theme computation to avoid race conditions by directly using storedTheme. * fix: update displayedTheme initialization in ThemeProvider to use storedTheme for consistency * fix: use theme styling within timeline (#6604) * fix: use theme styling within timeline * fix: remove inline styling and use css classes * fix: network logs within dev tools * compact timeline for grpc * refactor: standardize CSS class naming in StyledWrapper components for better readability * remove styling configuration from Network component * fix: update colors * update colors * fix: color * feat: improve RunnerResults filter bar to use theme system (#6613) * feat: integrate theme support in RunnerResults component for improved styling * refactor: simplify RunnerResults component and enhance filter button styling * style: adjust padding in StyledWrapper and remove aria-pressed from FilterButton * add: global env and workspace flag (#6534) * add: global env and workspace flag * rm: await * update: option name * fix * fix * fix: invalid collection in workspace (#6612) * fix: update Notifications and StatusBar components for improved functionality and styling (#6607) * feat: use theme colors for Console method badges (#6603) * feat: use theme colors for Console method badges * chore(theme): bruno devtools UX updates --------- Co-authored-by: Bijin A B <[email protected]> * fix: update @opencollection/types to version 0.6.0 and refactor auth handling in request items (#6619) * feat: enhance HttpMethodSelector to include caret indicator when creating new request (#6620) * feat(theme): update secondary button styles (#6621) * feat: update toast UI to match theme (#6622) * Improve delete collection in workspace overview (#6587) * Improve delete collection in workspace overview * fixes * Feat/v3 UI updates (#6618) * style: enhance button layout and input styles across multiple components for improved UI consistency * style: update RequestsNotLoaded component with new warning styles and enhance theme color definitions for status indicators * refactor: update theme usage across components for consistency - Changed color references from theme.brand to theme.primary.text in various StyledWrapper components. - Added hover effects to enhance UI interactivity in CollectionSettings and FolderSettings. - Removed unnecessary margin and padding adjustments in several components for cleaner layout. - Improved accessibility by ensuring aria attributes are correctly set in MenuDropdown. - Standardized styling for method indicators in RequestPane components. These changes aim to create a more cohesive look and feel across the application while adhering to the updated theme guidelines. * refactor: clean up method selector styling in NewRequest component * chore: temp playwright test fixes * refactor: update modal sizes across various components for consistency - Changed modal size from "sm" to "md" in RenameWorkspace, CreateApiSpec, CloneCollection, DeleteCollectionItem, and RenameCollection components. - Improved styling in HttpMethodSelector by adding padding for better layout. - Updated theme color references in multiple theme files to use a new palette structure for consistency and maintainability. * refactor: enhance styling and theme integration in TimelineItem components - Updated HttpMethodSelector to clarify padding calculation in comments. - Integrated theme colors for OAuth2 indicator and timestamp in TimelineItem for better visual consistency. - Adjusted Method component to use uppercase styling for method display. - Modified RelativeTime component to apply muted text color for improved readability. - Updated INFO color in dark and light themes for better contrast and accessibility. * refactor: remove duplicate import statements in theme files - Cleaned up import statements in vscode.js and light-pastel.js by removing redundant lines for improved code clarity and maintainability. * refactor: improve styling and theme integration in various components - Added accent color and cursor style for checkbox inputs in Modal's StyledWrapper. - Updated border-radius values in HttpMethodSelector and NewRequest StyledWrapper components to use theme variables for consistency. - Introduced a new textbox class in NewRequest StyledWrapper for better styling control. - Changed modal size from "sm" to "md" in CreateEnvironment for improved layout. --------- Co-authored-by: Bijin A B <[email protected]> * fix(UX): fix sandbox selector options background color (#6626) * update cdn links (#6628) * fix: toggle switch color (#6627) * fix: modal icon colors to match button colors (#6624) * style: update warning icon color in RemoveCollection and ConfirmSwitchEnv components to use theme colors * fix: font size in BulkEditor * style: update error message styling to use theme colors in QueryResult component * style: update warning icon color * style: update warning color in ConfirmSwitchEnv * chore: minor pr comment --------- Co-authored-by: Bijin A B <[email protected]> * fix: folder settings var panel table alignment (#6631) * style: remove font size class from button (#6630) * fix: authmode in graphql (#6636) * fix: file picker component overflow (#6635) * fix: tooltip styling (#6632) * refactor: update color references in OAuth2 components to use theme.primary.text for improved consistency (#6629) * refactor: update color references in OAuth2 components to use theme.primary.text for improved consistency * refactor: update modal size in ImportCollectionLocation component for improved consistency * refactor: set isActiveTab prop in QueryResponse component and update active color in StyledWrapper for consistency * feat: update "Show in Folder" label based on platform in ManageWorkspace, Collection, CollectionItem, and WorkspaceHome components (#6623) * feat: update "Show in Folder" label based on platform in ManageWorkspace, Collection, CollectionItem, and WorkspaceHome components * refactor: remove duplicate "Rename" item push in CollectionItem component * style: update text color classes and button hover effects in RunnerResults (#6637) * style: update text color classes and button hover effects in RunnerResults and StyledWrapper components * Update StyledWrapper.jsx --------- Co-authored-by: Bijin A B <[email protected]> * style: update variable validation colors in StyledWrapper components to use theme colors (#6633) --------- Co-authored-by: sanish chirayath <[email protected]> Co-authored-by: Abhishek S Lal <[email protected]> Co-authored-by: Pooja <[email protected]> Co-authored-by: Chirag Chandrashekhar <[email protected]> Co-authored-by: Sanjai Kumar <[email protected]> Co-authored-by: lohit <[email protected]> Co-authored-by: gopu-bruno <[email protected]> Co-authored-by: naman-bruno <[email protected]> Co-authored-by: Anoop M D <[email protected]>
* fix: use themes within protobuf section (#6575) * fix: use themes within protobuf section * chore: fix font weight for protobuf settings --------- Co-authored-by: Bijin A B <[email protected]> * fix: radios buttons to use primary color (#6576) * fix: cookie modal theme (#6580) * fix: cookie modal theme * update toggle switch to use primary color * style: enhance theme dropdown and security settings with improved styles and active indicators (#6582) * style: enhance CodeMirror dropdown styles with theme integration (#6577) * style: enhance CodeMirror dropdown styles with theme integration for improved consistency * style: refine dropdown and CodeMirror hint styles for improved consistency and usability * style: clean up scrollbar and CodeMirror hint styles for improved readability * remove max height for keybinding table (#6586) * fix: Add New Request CTA alignment in tabs (#6584) * fix: Add New Request CTA alignment in tabs - Moved the '+' icon before the chevron to maintain alignment once chevrons appear - Added padding to the '+' icon for better spacing. * refactor: streamline New Request button rendering in RequestTabs component - Simplified the rendering logic for the New Request button by removing unnecessary conditional wrappers. - Ensured the button remains functional and maintains its styling within the tab layout. * chore: update delete confirmation modals to use danger button color (#6589) * refactor: remove size prop from Button components for consistency across modals and improve styling * style: update confirm button colors in modal components for consistency * fix: oauth2 callback url field placeholder text update (#6588) * Fix auth panel UI updates (#6590) * style: update padding and font size in OAuth2 and Table components for improved consistency * style: update font styles in OAuth2 components for improved readability * fix: add missing semicolon in StyledWrapper.js for consistent styling * fix: standardize table border colors and improve table styling (#6597) * style: update OAuth2 section labels for improved consistency and readability (#6598) * fix: prefrence modal width (#6595) * fix: theme within grpc timeline (#6581) * fix: theme within grpc timeline * fix: use font from the theme * remove y padding to make timeline item more compact * fix: font * fix: padding * fix: use fira code * fix: icon spacing * add border to the method search * show bg for message section within request * fix: collection already opened in other workspace (#6574) * fix: collection already opened in other workspace * fix * fixes * Merge pull request #6583 from naman-bruno/add/collection-docs add: collection-docs * add: beta tag for opencollection & fix create collection location behaviour (#6594) * add: beta tag for opencollection * fixes * fix * feat: improved dark mode color (#6616) * fix: resolve request pane tooltip visibility issue (#6615) * Feat/update file picker (#6614) * styling: file-picker editor component * use filepicker component within filebody and response example filebody * edit example to use button components * fix: hide delete, disable checkbox in preview mode * make label italic * chore: change example cta buttons to filled style --------- Co-authored-by: Bijin A B <[email protected]> * fix: folder docs save button visibility issue (#6617) * refactor: improve theme handling in ThemeProvider for better responsiveness to system preferences (#6606) * refactor: improve theme handling in ThemeProvider for better responsiveness to system preferences - Introduced helper functions to determine effective theme and apply it to the root element. - Updated theme application logic to respond to system theme changes more efficiently. - Simplified theme computation to avoid race conditions by directly using storedTheme. * fix: update displayedTheme initialization in ThemeProvider to use storedTheme for consistency * fix: use theme styling within timeline (#6604) * fix: use theme styling within timeline * fix: remove inline styling and use css classes * fix: network logs within dev tools * compact timeline for grpc * refactor: standardize CSS class naming in StyledWrapper components for better readability * remove styling configuration from Network component * fix: update colors * update colors * fix: color * feat: improve RunnerResults filter bar to use theme system (#6613) * feat: integrate theme support in RunnerResults component for improved styling * refactor: simplify RunnerResults component and enhance filter button styling * style: adjust padding in StyledWrapper and remove aria-pressed from FilterButton * add: global env and workspace flag (#6534) * add: global env and workspace flag * rm: await * update: option name * fix * fix * fix: invalid collection in workspace (#6612) * fix: update Notifications and StatusBar components for improved functionality and styling (#6607) * feat: use theme colors for Console method badges (#6603) * feat: use theme colors for Console method badges * chore(theme): bruno devtools UX updates --------- Co-authored-by: Bijin A B <[email protected]> * fix: update @opencollection/types to version 0.6.0 and refactor auth handling in request items (#6619) * feat: enhance HttpMethodSelector to include caret indicator when creating new request (#6620) * feat(theme): update secondary button styles (#6621) * feat: update toast UI to match theme (#6622) * Improve delete collection in workspace overview (#6587) * Improve delete collection in workspace overview * fixes * Feat/v3 UI updates (#6618) * style: enhance button layout and input styles across multiple components for improved UI consistency * style: update RequestsNotLoaded component with new warning styles and enhance theme color definitions for status indicators * refactor: update theme usage across components for consistency - Changed color references from theme.brand to theme.primary.text in various StyledWrapper components. - Added hover effects to enhance UI interactivity in CollectionSettings and FolderSettings. - Removed unnecessary margin and padding adjustments in several components for cleaner layout. - Improved accessibility by ensuring aria attributes are correctly set in MenuDropdown. - Standardized styling for method indicators in RequestPane components. These changes aim to create a more cohesive look and feel across the application while adhering to the updated theme guidelines. * refactor: clean up method selector styling in NewRequest component * chore: temp playwright test fixes * refactor: update modal sizes across various components for consistency - Changed modal size from "sm" to "md" in RenameWorkspace, CreateApiSpec, CloneCollection, DeleteCollectionItem, and RenameCollection components. - Improved styling in HttpMethodSelector by adding padding for better layout. - Updated theme color references in multiple theme files to use a new palette structure for consistency and maintainability. * refactor: enhance styling and theme integration in TimelineItem components - Updated HttpMethodSelector to clarify padding calculation in comments. - Integrated theme colors for OAuth2 indicator and timestamp in TimelineItem for better visual consistency. - Adjusted Method component to use uppercase styling for method display. - Modified RelativeTime component to apply muted text color for improved readability. - Updated INFO color in dark and light themes for better contrast and accessibility. * refactor: remove duplicate import statements in theme files - Cleaned up import statements in vscode.js and light-pastel.js by removing redundant lines for improved code clarity and maintainability. * refactor: improve styling and theme integration in various components - Added accent color and cursor style for checkbox inputs in Modal's StyledWrapper. - Updated border-radius values in HttpMethodSelector and NewRequest StyledWrapper components to use theme variables for consistency. - Introduced a new textbox class in NewRequest StyledWrapper for better styling control. - Changed modal size from "sm" to "md" in CreateEnvironment for improved layout. --------- Co-authored-by: Bijin A B <[email protected]> * fix(UX): fix sandbox selector options background color (#6626) * update cdn links (#6628) * fix: toggle switch color (#6627) * fix: modal icon colors to match button colors (#6624) * style: update warning icon color in RemoveCollection and ConfirmSwitchEnv components to use theme colors * fix: font size in BulkEditor * style: update error message styling to use theme colors in QueryResult component * style: update warning icon color * style: update warning color in ConfirmSwitchEnv * chore: minor pr comment --------- Co-authored-by: Bijin A B <[email protected]> * fix: folder settings var panel table alignment (#6631) * style: remove font size class from button (#6630) * fix: authmode in graphql (#6636) * fix: file picker component overflow (#6635) * fix: tooltip styling (#6632) * refactor: update color references in OAuth2 components to use theme.primary.text for improved consistency (#6629) * refactor: update color references in OAuth2 components to use theme.primary.text for improved consistency * refactor: update modal size in ImportCollectionLocation component for improved consistency * refactor: set isActiveTab prop in QueryResponse component and update active color in StyledWrapper for consistency * feat: update "Show in Folder" label based on platform in ManageWorkspace, Collection, CollectionItem, and WorkspaceHome components (#6623) * feat: update "Show in Folder" label based on platform in ManageWorkspace, Collection, CollectionItem, and WorkspaceHome components * refactor: remove duplicate "Rename" item push in CollectionItem component * style: update text color classes and button hover effects in RunnerResults (#6637) * style: update text color classes and button hover effects in RunnerResults and StyledWrapper components * Update StyledWrapper.jsx --------- Co-authored-by: Bijin A B <[email protected]> * style: update variable validation colors in StyledWrapper components to use theme colors (#6633) * refactor: update Tabs component structure and theme colors (#6638) - Replaced the div wrapper in the Tabs component with StyledWrapper for improved styling. - Simplified TabsList and TabsTrigger components by removing theme dependency and using classnames for styling. - Updated inactive background colors in multiple theme files to enhance visual consistency across themes. * feat: integrate theme support in ImportCollection component (#6639) * feat: integrate theme support in ImportCollection component for improved styling consistency * chore: remove debug console log from ImportCollection component * refactor: update theme import in ImportCollection component for improved consistency * style: enhance syntax highlighting in GQL Docs and Doc Gen (#6640) * style: enhance syntax highlighting and theme integration in QueryEditor and GenerateDocs components * fix: fixed generate code theming issues * style: update color references to use theme.draftColor for unsaved changes across multiple components (#6641) * chore: theme updates (#6642) --------- Co-authored-by: sanish chirayath <[email protected]> Co-authored-by: Abhishek S Lal <[email protected]> Co-authored-by: Pooja <[email protected]> Co-authored-by: Chirag Chandrashekhar <[email protected]> Co-authored-by: Sanjai Kumar <[email protected]> Co-authored-by: lohit <[email protected]> Co-authored-by: gopu-bruno <[email protected]> Co-authored-by: naman-bruno <[email protected]> Co-authored-by: Anoop M D <[email protected]>
* style: enhance button layout and input styles across multiple components for improved UI consistency * style: update RequestsNotLoaded component with new warning styles and enhance theme color definitions for status indicators * refactor: update theme usage across components for consistency - Changed color references from theme.brand to theme.primary.text in various StyledWrapper components. - Added hover effects to enhance UI interactivity in CollectionSettings and FolderSettings. - Removed unnecessary margin and padding adjustments in several components for cleaner layout. - Improved accessibility by ensuring aria attributes are correctly set in MenuDropdown. - Standardized styling for method indicators in RequestPane components. These changes aim to create a more cohesive look and feel across the application while adhering to the updated theme guidelines. * refactor: clean up method selector styling in NewRequest component * chore: temp playwright test fixes * refactor: update modal sizes across various components for consistency - Changed modal size from "sm" to "md" in RenameWorkspace, CreateApiSpec, CloneCollection, DeleteCollectionItem, and RenameCollection components. - Improved styling in HttpMethodSelector by adding padding for better layout. - Updated theme color references in multiple theme files to use a new palette structure for consistency and maintainability. * refactor: enhance styling and theme integration in TimelineItem components - Updated HttpMethodSelector to clarify padding calculation in comments. - Integrated theme colors for OAuth2 indicator and timestamp in TimelineItem for better visual consistency. - Adjusted Method component to use uppercase styling for method display. - Modified RelativeTime component to apply muted text color for improved readability. - Updated INFO color in dark and light themes for better contrast and accessibility. * refactor: remove duplicate import statements in theme files - Cleaned up import statements in vscode.js and light-pastel.js by removing redundant lines for improved code clarity and maintainability. * refactor: improve styling and theme integration in various components - Added accent color and cursor style for checkbox inputs in Modal's StyledWrapper. - Updated border-radius values in HttpMethodSelector and NewRequest StyledWrapper components to use theme variables for consistency. - Introduced a new textbox class in NewRequest StyledWrapper for better styling control. - Changed modal size from "sm" to "md" in CreateEnvironment for improved layout. --------- Co-authored-by: Bijin A B <[email protected]>
Description
These changes aim to create a more cohesive look and feel across the application while adhering to the updated theme guidelines.
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
New Features
Style
Accessibility
Tests
✏️ Tip: You can customize this high-level summary in your review settings.