Skip to content

add: global env and workspace flag#6534

Merged
bijin-bruno merged 5 commits intousebruno:mainfrom
naman-bruno:add/global-env-flag
Jan 1, 2026
Merged

add: global env and workspace flag#6534
bijin-bruno merged 5 commits intousebruno:mainfrom
naman-bruno:add/global-env-flag

Conversation

@naman-bruno
Copy link
Collaborator

@naman-bruno naman-bruno commented Dec 29, 2025

Description

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

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

    • Added --global-env and --workspace-path options to the run command.
    • Support for YAML-based global environment files and merging of global and local environment variables (local wins).
  • Improvements

    • Workspace-aware validation ensuring collections are inside a workspace before using global envs.
    • More specific exit statuses for workspace/environment errors and clearer error behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 29, 2025

Walkthrough

Adds workspace-aware global environment support to the CLI run command: YAML parsing, workspace discovery and validation, loading of workspace-level environments, merging with local env vars (local precedence), new CLI options (--global-env, --workspace-path), and three new exit status codes.

Changes

Cohort / File(s) Summary
Exit status codes
packages/bruno-cli/src/constants.js
Added exit codes: ERROR_WORKSPACE_NOT_FOUND (11), ERROR_GLOBAL_ENV_REQUIRES_WORKSPACE (12), ERROR_GLOBAL_ENV_NOT_FOUND (13).
Global environment CLI support
packages/bruno-cli/src/commands/run.js
Added --global-env and --workspace-path options; workspace discovery (walk up to workspace.yml), validate collection membership, load/parse environments/${globalEnv}.yml via js-yaml, merge global vars with local env vars (local wins), set __name__, add specific exit statuses for failure cases, and added examples.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant CLI as CLI (run)
participant FS as Filesystem
participant YAML as js-yaml
participant Runner as Runner Logic
Note right of CLI: user supplies --global-env / --workspace-path
CLI->>FS: determine collection path
CLI->>FS: walk up to find workspace.yml
alt workspace not found
FS-->>CLI: not found
CLI->>Runner: exit ERROR_WORKSPACE_NOT_FOUND
else workspace found
CLI->>FS: verify collection is inside workspace
alt collection not in workspace
FS-->>CLI: not contained
CLI->>Runner: exit ERROR_GLOBAL_ENV_REQUIRES_WORKSPACE
else contained
CLI->>FS: read environments/{globalEnv}.yml
alt file missing or invalid
FS-->>CLI: error
CLI->>Runner: exit ERROR_GLOBAL_ENV_NOT_FOUND / ERROR_INVALID_FILE
else file read
CLI->>YAML: parse YAML
YAML-->>CLI: env object
CLI->>Runner: merge global + local (local wins), set __name__
Runner-->>CLI: proceed with merged envVars
end
end
end

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Suggested reviewers

  • helloanoop
  • lohit-bruno
  • bijin-bruno

Poem

🌳 Walk up the tree to workspace ground,
YAML opens doors with a tidy sound,
Global greets local, variables blend,
Names stitched in place, ready to send,
CLI takes a breath — the run begins.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main changes: adding global environment and workspace flag options to the CLI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8344804 and bee2755.

📒 Files selected for processing (1)
  • packages/bruno-cli/src/constants.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() not func ()
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-cli/src/constants.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-cli/src/constants.js
⏰ 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: CLI Tests
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: Unit Tests
  • GitHub Check: SSL Tests - macOS
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: SSL Tests - Windows
🔇 Additional comments (1)
packages/bruno-cli/src/constants.js (1)

28-33: LGTM! Clean addition of workspace-related exit codes.

The three new exit status codes are well-documented, sequentially numbered, and consistent with the existing pattern. The comments clearly describe each error condition, and all codes are properly used in run.js for their respective error scenarios.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
packages/bruno-cli/src/commands/run.js (2)

399-411: Consider extracting workspace utilities.

The findWorkspacePath function logic is correct and handles upward traversal properly. However, this and isCollectionInWorkspace (lines 413-434) are substantial utility functions that could be extracted to a separate module (e.g., ../utils/workspace.js) for better organization and reusability.


399-487: Consider extracting global environment logic.

This 89-line block handles workspace discovery, validation, and global environment loading. Consider extracting this into a dedicated function (e.g., loadGlobalEnvironment(globalEnv, workspacePath, collectionPath, envVars)) to improve readability and testability of the handler.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c714e9b and 0bf1634.

📒 Files selected for processing (2)
  • packages/bruno-cli/src/commands/run.js
  • packages/bruno-cli/src/constants.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() not func ()
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-cli/src/constants.js
  • packages/bruno-cli/src/commands/run.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-cli/src/constants.js
  • packages/bruno-cli/src/commands/run.js
🧬 Code graph analysis (1)
packages/bruno-cli/src/commands/run.js (3)
packages/bruno-app/src/utils/collections/index.js (3)
  • getEnvVars (1325-1344)
  • getEnvVars (1325-1344)
  • envVars (1333-1333)
packages/bruno-filestore/src/index.ts (1)
  • parseEnvironment (115-122)
packages/bruno-cli/src/utils/bru.js (2)
  • getEnvVars (130-144)
  • envVars (136-136)
⏰ 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: SSL Tests - Windows
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: CLI Tests
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: Unit Tests
🔇 Additional comments (10)
packages/bruno-cli/src/constants.js (1)

28-35: LGTM! Clean exit code additions.

The new exit status codes are well-defined with clear comments and follow the existing pattern. The sequential numbering and descriptive names make error handling straightforward.

packages/bruno-cli/src/commands/run.js (9)

4-4: LGTM! Appropriate dependency for YAML parsing.

The js-yaml import is necessary for parsing workspace and global environment YAML files.


139-146: LGTM! Well-defined CLI options.

The new options follow the existing pattern with clear descriptions and appropriate types. The workspace option correctly notes it's auto-detected if not provided.


273-280: LGTM! Helpful usage examples.

The examples clearly demonstrate how to use the new global environment and workspace flags, covering both auto-detection and explicit workspace path scenarios.


292-293: LGTM! Proper parameter extraction.

The new parameters are correctly destructured from argv, with workspace renamed to workspacePath for clarity within the handler.


349-349: LGTM! Appropriate error code for unexpected errors.

Using ERROR_GENERIC for unexpected errors in the client certificate config handling is appropriate.


413-434: LGTM! Robust workspace validation.

The isCollectionInWorkspace function correctly handles symlinks with realpathSync, properly normalizes paths for comparison, and appropriately returns false on errors. The validation logic is sound.


483-487: LGTM! Correct merge precedence.

The merge logic correctly gives precedence to local envVars over globalEnvVars (line 483), and properly preserves the global environment name when no local environment is specified (lines 484-486).


477-477: Unable to verify review comment — repository access failed.

Manual verification required. The repository could not be cloned to inspect the getEnvVars implementation in packages/bruno-cli/src/utils/bru.js or the referenced lines in packages/bruno-cli/src/commands/run.js. Please review the claimed inconsistency in __name__ handling at lines 477, 484-486, 385, and 395 directly against the actual getEnvVars implementation.


475-475: YAML environment parsing is correctly implemented.

The parseEnvironment function from @usebruno/filestore properly supports the { format: 'yml' } option, delegating to parseYmlEnvironment for YAML-based environments. The code at line 475 is correct.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
packages/bruno-cli/src/commands/run.js (1)

473-481: Past review issue resolved.

The unnecessary await has been correctly removed from the parseEnvironment() call. The global environment parsing logic is now correct.

🧹 Nitpick comments (1)
packages/bruno-cli/src/commands/run.js (1)

413-434: Consider logging errors in the catch block.

The catch block at line 431-433 silently returns false for any error, which might hide issues like malformed YAML or file system errors. While this makes the function more tolerant, it could make debugging difficult.

💡 Optional improvement
       } catch (err) {
+        if (verbose) {
+          console.warn(chalk.yellow(`Warning: Could not validate workspace membership: ${err.message}`));
+        }
         return false;
       }

Note: You'd need to pass the verbose flag down to this function or consider using a debug logger.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0bf1634 and 9e974cc.

📒 Files selected for processing (1)
  • packages/bruno-cli/src/commands/run.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() not func ()
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-cli/src/commands/run.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-cli/src/commands/run.js
⏰ 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: SSL Tests - Linux
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: CLI Tests
  • GitHub Check: SSL Tests - macOS
🔇 Additional comments (6)
packages/bruno-cli/src/commands/run.js (6)

139-146: LGTM!

The new CLI options are well-defined with clear descriptions that explain their purpose and relationship.


273-280: LGTM!

The new usage examples clearly demonstrate the global environment functionality in both auto-detection and explicit workspace scenarios.


292-293: LGTM!

Parameter destructuring is correct and the rename to workspacePath improves clarity.


349-349: LGTM!

Using ERROR_GENERIC is appropriate for this catch-all error handler.


401-411: LGTM!

The workspace path discovery logic correctly walks up the directory tree and handles the root directory edge case.


399-487: Well-structured global environment implementation.

The workspace discovery, validation, and global environment loading logic is comprehensive:

  • Auto-detection of workspace is intuitive
  • Validation checks are thorough with clear error messages
  • Error handling uses appropriate exit codes
  • Environment variable merging correctly prioritizes local over global

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/bruno-cli/src/commands/run.js (1)

401-434: Consider extracting helper functions for testability.

The findWorkspacePath and isCollectionInWorkspace functions are well-implemented with proper error handling and infinite loop protection. However, defining them inline within the handler reduces testability.

Consider extracting these to a separate module (e.g., utils/workspace.js) to enable unit testing of the workspace resolution logic independently.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e974cc and 01ff9e8.

📒 Files selected for processing (1)
  • packages/bruno-cli/src/commands/run.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() not func ()
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-cli/src/commands/run.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-cli/src/commands/run.js
🧬 Code graph analysis (1)
packages/bruno-cli/src/commands/run.js (4)
packages/bruno-app/src/utils/collections/index.js (3)
  • getEnvVars (1325-1344)
  • getEnvVars (1325-1344)
  • envVars (1333-1333)
packages/bruno-cli/src/utils/filesystem.js (2)
  • fs (2-2)
  • exists (5-12)
packages/bruno-filestore/src/index.ts (1)
  • parseEnvironment (115-122)
packages/bruno-cli/src/utils/bru.js (2)
  • getEnvVars (130-144)
  • envVars (136-136)
⏰ 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: CLI Tests
  • GitHub Check: Unit Tests
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: SSL Tests - macOS
🔇 Additional comments (6)
packages/bruno-cli/src/commands/run.js (6)

139-146: LGTM! Clear and well-structured CLI options.

The new --global-env and --workspace-path options follow the existing pattern and have clear descriptions. The type declarations are correct.


272-280: LGTM! Examples clearly demonstrate the new feature.

The examples effectively show how to use the --global-env flag both with auto-detection and with an explicit workspace path.


349-349: LGTM! Improved error handling consistency.

Using ERROR_GENERIC from the constants module improves consistency across the error handling in this file.


436-471: LGTM! Comprehensive workspace validation with clear error messages.

The workspace discovery and validation logic is well-structured:

  • Auto-detects workspace path by walking up the directory tree
  • Validates workspace existence and structure
  • Confirms collection membership in the workspace
  • Provides specific, actionable error messages with appropriate exit codes

The error handling guides users effectively when something goes wrong.


473-481: LGTM! Global environment parsing is correct.

The global environment file parsing logic correctly:

  • Reads the YAML file content
  • Parses it using the synchronous parseEnvironment function (the previous issue with unnecessary await was correctly addressed)
  • Extracts enabled environment variables
  • Assigns the environment name for identification
  • Handles errors appropriately

483-487: LGTM! Environment variable merge logic is correct.

The merge strategy correctly gives precedence to local environment variables over global ones:

  • Global env vars are spread first, then local env vars (so local values override global)
  • The __name__ property handling ensures the environment name is preserved appropriately
  • This provides the expected behavior where local configuration takes precedence over workspace-level configuration

@pull-request-size pull-request-size bot added size/M and removed size/L labels Jan 1, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
packages/bruno-cli/src/commands/run.js (2)

453-456: Optional: Redundant __name__ assignment (low priority).

The check on lines 454-456 is redundant because the spread operation on line 453 already preserves globalEnvVars.__name__ when envVars doesn't have it. However, this defensive check doesn't hurt and makes intent explicit, so it can remain.

📝 Explanation

When spreading { ...globalEnvVars, ...envVars }:

  • If envVars doesn't have __name__ property, the result inherits it from globalEnvVars
  • If envVars has __name__, it overrides globalEnvVars.__name__

The subsequent check is unnecessary unless envVars.__name__ could be explicitly undefined, which doesn't happen in this codebase.


401-411: Consider extracting findWorkspacePath for testability.

The workspace discovery logic is correct and handles the walk-up-the-tree pattern well. Extracting it to a separate utility function would improve testability and reusability.

🔎 Suggested refactor

Move to a utility file like packages/bruno-cli/src/utils/workspace.js:

const fs = require('fs');
const path = require('path');

const findWorkspacePath = (startPath) => {
  let currentPath = startPath;
  while (currentPath !== path.dirname(currentPath)) {
    const workspaceYmlPath = path.join(currentPath, 'workspace.yml');
    if (fs.existsSync(workspaceYmlPath)) {
      return currentPath;
    }
    currentPath = path.dirname(currentPath);
  }
  return null;
};

module.exports = { findWorkspacePath };

Then import and use in run.js.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 01ff9e8 and 8344804.

📒 Files selected for processing (1)
  • packages/bruno-cli/src/commands/run.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() not func ()
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-cli/src/commands/run.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-cli/src/commands/run.js
🧬 Code graph analysis (1)
packages/bruno-cli/src/commands/run.js (2)
packages/bruno-filestore/src/index.ts (1)
  • parseEnvironment (115-122)
packages/bruno-cli/src/utils/bru.js (2)
  • getEnvVars (130-144)
  • envVars (136-136)
⏰ 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: SSL Tests - Linux
  • GitHub Check: Unit Tests
  • GitHub Check: SSL Tests - macOS
  • GitHub Check: CLI Tests
  • GitHub Check: SSL Tests - Windows
🔇 Additional comments (2)
packages/bruno-cli/src/commands/run.js (2)

139-146: LGTM! Clear CLI options for workspace-aware global environments.

The new --global-env and --workspace-path options are well-defined with appropriate types and descriptions.


273-280: Good examples demonstrating both workspace discovery patterns.

The examples clearly show usage with auto-detected and explicitly provided workspace paths.

Comment on lines +413 to +433
if (!workspacePath) {
workspacePath = findWorkspacePath(collectionPath);
}

if (!workspacePath) {
console.error(chalk.red(`Workspace not found. Please specify a workspace path using --workspace-path or ensure the collection is inside a workspace directory.`));
process.exit(constants.EXIT_STATUS.ERROR_GLOBAL_ENV_REQUIRES_WORKSPACE);
}

const workspaceExists = await exists(workspacePath);
if (!workspaceExists) {
console.error(chalk.red(`Workspace path not found: `) + chalk.dim(workspacePath));
process.exit(constants.EXIT_STATUS.ERROR_WORKSPACE_NOT_FOUND);
}

const workspaceYmlPath = path.join(workspacePath, 'workspace.yml');
const workspaceYmlExists = await exists(workspaceYmlPath);
if (!workspaceYmlExists) {
console.error(chalk.red(`Invalid workspace: workspace.yml not found in `) + chalk.dim(workspacePath));
process.exit(constants.EXIT_STATUS.ERROR_WORKSPACE_NOT_FOUND);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add validation that collection is inside workspace.

When --workspace-path is explicitly provided by the user (not auto-discovered), the code should validate that collectionPath is actually inside workspacePath. The exit status ERROR_COLLECTION_NOT_IN_WORKSPACE exists for this scenario but is never used.

This validation ensures users don't accidentally reference global environments from an unrelated workspace.

🔎 Proposed fix

Add validation after line 420 (after workspacePath is determined):

       process.exit(constants.EXIT_STATUS.ERROR_GLOBAL_ENV_REQUIRES_WORKSPACE);
     }
 
+    // Validate that collection is inside workspace
+    const relativePathToCollection = path.relative(workspacePath, collectionPath);
+    if (relativePathToCollection.startsWith('..') || path.isAbsolute(relativePathToCollection)) {
+      console.error(chalk.red(`Collection must be inside the workspace.`));
+      console.error(chalk.dim(`Collection: ${collectionPath}`));
+      console.error(chalk.dim(`Workspace: ${workspacePath}`));
+      process.exit(constants.EXIT_STATUS.ERROR_COLLECTION_NOT_IN_WORKSPACE);
+    }
+
     const workspaceExists = await exists(workspacePath);
     if (!workspaceExists) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (!workspacePath) {
workspacePath = findWorkspacePath(collectionPath);
}
if (!workspacePath) {
console.error(chalk.red(`Workspace not found. Please specify a workspace path using --workspace-path or ensure the collection is inside a workspace directory.`));
process.exit(constants.EXIT_STATUS.ERROR_GLOBAL_ENV_REQUIRES_WORKSPACE);
}
const workspaceExists = await exists(workspacePath);
if (!workspaceExists) {
console.error(chalk.red(`Workspace path not found: `) + chalk.dim(workspacePath));
process.exit(constants.EXIT_STATUS.ERROR_WORKSPACE_NOT_FOUND);
}
const workspaceYmlPath = path.join(workspacePath, 'workspace.yml');
const workspaceYmlExists = await exists(workspaceYmlPath);
if (!workspaceYmlExists) {
console.error(chalk.red(`Invalid workspace: workspace.yml not found in `) + chalk.dim(workspacePath));
process.exit(constants.EXIT_STATUS.ERROR_WORKSPACE_NOT_FOUND);
}
if (!workspacePath) {
workspacePath = findWorkspacePath(collectionPath);
}
if (!workspacePath) {
console.error(chalk.red(`Workspace not found. Please specify a workspace path using --workspace-path or ensure the collection is inside a workspace directory.`));
process.exit(constants.EXIT_STATUS.ERROR_GLOBAL_ENV_REQUIRES_WORKSPACE);
}
// Validate that collection is inside workspace
const relativePathToCollection = path.relative(workspacePath, collectionPath);
if (relativePathToCollection.startsWith('..') || path.isAbsolute(relativePathToCollection)) {
console.error(chalk.red(`Collection must be inside the workspace.`));
console.error(chalk.dim(`Collection: ${collectionPath}`));
console.error(chalk.dim(`Workspace: ${workspacePath}`));
process.exit(constants.EXIT_STATUS.ERROR_COLLECTION_NOT_IN_WORKSPACE);
}
const workspaceExists = await exists(workspacePath);
if (!workspaceExists) {
console.error(chalk.red(`Workspace path not found: `) + chalk.dim(workspacePath));
process.exit(constants.EXIT_STATUS.ERROR_WORKSPACE_NOT_FOUND);
}
const workspaceYmlPath = path.join(workspacePath, 'workspace.yml');
const workspaceYmlExists = await exists(workspaceYmlPath);
if (!workspaceYmlExists) {
console.error(chalk.red(`Invalid workspace: workspace.yml not found in `) + chalk.dim(workspacePath));
process.exit(constants.EXIT_STATUS.ERROR_WORKSPACE_NOT_FOUND);
}

@bijin-bruno bijin-bruno merged commit f961e69 into usebruno:main Jan 1, 2026
8 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Jan 5, 2026
6 tasks
@coderabbitai coderabbitai bot mentioned this pull request Jan 29, 2026
6 tasks
bijin-bruno added a commit that referenced this pull request Feb 13, 2026
* 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 <bijin@usebruno.com>

* 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 <bijin@usebruno.com>

* 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 <bijin@usebruno.com>

* 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)

---------

Co-authored-by: sanish chirayath <sanish@usebruno.com>
Co-authored-by: Abhishek S Lal <abhishek@usebruno.com>
Co-authored-by: Pooja <pooja@usebruno.com>
Co-authored-by: Chirag Chandrashekhar <chirag@usebruno.com>
Co-authored-by: Sanjai Kumar <161328623+sanjaikumar-bruno@users.noreply.github.com>
Co-authored-by: lohit <lohit@usebruno.com>
Co-authored-by: gopu-bruno <gopu@usebruno.com>
Co-authored-by: naman-bruno <naman@usebruno.com>
Co-authored-by: Anoop M D <anoop@usebruno.com>
bijin-bruno added a commit that referenced this pull request Feb 13, 2026
* 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 <bijin@usebruno.com>

* 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 <bijin@usebruno.com>

* 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 <bijin@usebruno.com>

* 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 <bijin@usebruno.com>

* 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 <bijin@usebruno.com>

* 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 <bijin@usebruno.com>

* style: update variable validation colors in StyledWrapper components to use theme colors (#6633)

---------

Co-authored-by: sanish chirayath <sanish@usebruno.com>
Co-authored-by: Abhishek S Lal <abhishek@usebruno.com>
Co-authored-by: Pooja <pooja@usebruno.com>
Co-authored-by: Chirag Chandrashekhar <chirag@usebruno.com>
Co-authored-by: Sanjai Kumar <161328623+sanjaikumar-bruno@users.noreply.github.com>
Co-authored-by: lohit <lohit@usebruno.com>
Co-authored-by: gopu-bruno <gopu@usebruno.com>
Co-authored-by: naman-bruno <naman@usebruno.com>
Co-authored-by: Anoop M D <anoop@usebruno.com>
bijin-bruno added a commit that referenced this pull request Feb 13, 2026
* 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 <bijin@usebruno.com>

* 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 <bijin@usebruno.com>

* 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 <bijin@usebruno.com>

* 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 <bijin@usebruno.com>

* 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 <bijin@usebruno.com>

* 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 <bijin@usebruno.com>

* 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 <sanish@usebruno.com>
Co-authored-by: Abhishek S Lal <abhishek@usebruno.com>
Co-authored-by: Pooja <pooja@usebruno.com>
Co-authored-by: Chirag Chandrashekhar <chirag@usebruno.com>
Co-authored-by: Sanjai Kumar <161328623+sanjaikumar-bruno@users.noreply.github.com>
Co-authored-by: lohit <lohit@usebruno.com>
Co-authored-by: gopu-bruno <gopu@usebruno.com>
Co-authored-by: naman-bruno <naman@usebruno.com>
Co-authored-by: Anoop M D <anoop@usebruno.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants