Skip to content

fix(description): bulk edit round trip looses description information - #8595

Merged
sid-bruno merged 1 commit into
usebruno:mainfrom
sid-bruno:fix/description-bulk-edit
Jul 14, 2026
Merged

sid-bruno merged 1 commit into
usebruno:mainfrom
sid-bruno:fix/description-bulk-edit

Conversation

@sid-bruno

@sid-bruno sid-bruno commented Jul 14, 2026 •

Copy link
Copy Markdown
Collaborator

Description

BRU-3847


  • Adds a pass through for the description values in bulk edit mode
  • Additional logic for the description columns to be empty if name and value already exist

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

  • Preserve request parameter metadata, including descriptions, when applying bulk edits by matching edited entries to their original items.
  • Retain descriptions in response example parameters and headers during bulk updates.
  • Show description placeholders only for trailing empty rows, preventing existing descriptions from appearing blank during bulk-edit round trips.
  • Update CodeMirror and text-input placeholder styling to use theme-provided colors and opacity.

Copilot AI review requested due to automatic review settings July 14, 2026 09:36
@sid-bruno
sid-bruno marked this pull request as draft July 14, 2026 09:36
@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Bulk editing now preserves per-item metadata, response example updates retain incoming fields, and placeholder visibility and styling respond to row state, runtime changes, and theme values.

Changes

Editing state preservation

Layer / File(s) Summary
Bulk metadata and mappings
packages/bruno-app/src/components/BulkEditor/index.js, packages/bruno-app/src/providers/ReduxStore/slices/collections/exampleReducers.js, packages/bruno-app/src/components/ResponseExample/...
Bulk edits reattach original metadata, while response example parameter descriptions and headers are passed through without stripping fields.
Description placeholder rules
packages/bruno-app/src/components/EditableTable/..., packages/bruno-app/src/components/EnvironmentVariablesTable/index.js, packages/bruno-app/src/components/RequestPane/FileBody/index.js, packages/bruno-app/src/components/MultiLineEditor/index.js
Description placeholders are restricted to applicable empty rows and file-body states, and CodeMirror updates its placeholder when the prop changes.
Placeholder theme styling
packages/bruno-app/src/components/CodeEditor/StyledWrapper.js, packages/bruno-app/src/components/EditableTable/StyledWrapper.js, packages/bruno-app/src/components/MultiLineEditor/StyledWrapper.js, packages/bruno-app/src/components/SingleLineEditor/StyledWrapper.js
Placeholder colors and opacity use theme-provided values across CodeMirror and text inputs.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: sanish-bruno, lohit-bruno, helloanoop, naman-bruno, bijin-bruno

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: preserving description information through bulk edit round trips.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates how “Description” placeholders are shown across several request/bulk-edit editors so that placeholders only appear on truly empty rows/fields (and stay blank when a row already has primary data like name/value/file path).

Changes:

  • Adjusts description placeholder conditions to only show on the last empty row in bulk-edit style tables.
  • Refines File Body description placeholder logic to avoid showing “Description” when a file path already exists.
  • Adds CodeMirror placeholder option updates when the placeholder prop changes.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/bruno-app/src/components/RequestPane/FileBody/index.js Only shows “Description” placeholder when both file path and description are empty.
packages/bruno-app/src/components/MultiLineEditor/index.js Updates CodeMirror placeholder dynamically when the React prop changes.
packages/bruno-app/src/components/EnvironmentVariablesTable/index.js Restricts description placeholder to the last empty row only.
packages/bruno-app/src/components/EditableTable/descriptionColumn.js Restricts bulk-edit description placeholder to the last empty row only.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pull-request-size pull-request-size Bot added size/M and removed size/S labels Jul 14, 2026
@sid-bruno
sid-bruno marked this pull request as ready for review July 14, 2026 10:34
@sid-bruno sid-bruno changed the title fix(description): update placeholder logic for empty description fields fix(description): bulk edit round trip looses description information Jul 14, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/bruno-app/src/components/BulkEditor/index.js`:
- Around line 22-26: Update the withPreservedMeta mapping to associate each
parsed item’s metadata by matching its name in originalParamsRef.current first,
and use the current index only when no name match exists. Preserve the existing
description and annotations defaults while ensuring inserted or reordered rows
retain the correct metadata.

In `@packages/bruno-app/src/components/EditableTable/descriptionColumn.js`:
- Line 30: Use trim-aware emptiness checks for both placeholder conditions: in
packages/bruno-app/src/components/EditableTable/descriptionColumn.js lines
30-30, treat whitespace-only value as empty; in
packages/bruno-app/src/components/RequestPane/FileBody/index.js lines 165-165,
apply the same behavior to param.description. Align both with the existing
EnvironmentVariablesTable definition.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 50392d0e-98e7-40cf-b337-0d08030cf3ba

📥 Commits

Reviewing files that changed from the base of the PR and between 8be2d75 and 61ec6d6.

📒 Files selected for processing (7)
  • packages/bruno-app/src/components/BulkEditor/index.js
  • packages/bruno-app/src/components/EditableTable/descriptionColumn.js
  • packages/bruno-app/src/components/EnvironmentVariablesTable/index.js
  • packages/bruno-app/src/components/MultiLineEditor/index.js
  • packages/bruno-app/src/components/RequestPane/FileBody/index.js
  • packages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/ResponseExampleResponseHeaders/index.js
  • packages/bruno-app/src/providers/ReduxStore/slices/collections/exampleReducers.js

@sid-bruno
sid-bruno force-pushed the fix/description-bulk-edit branch from 13bbc87 to 138243c Compare July 14, 2026 11:20
@pull-request-size pull-request-size Bot added size/L and removed size/M labels Jul 14, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
packages/bruno-app/src/components/AiChatSidebar/index.js (1)

265-273: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove ipcRenderer existence check.

Based on learnings, in the Bruno Electron renderer code, assume window.ipcRenderer is always available and skip existence checks.

♻️ Proposed refactor
   useEffect(() => {
-    const { ipcRenderer } = window;
-    if (!ipcRenderer) return;
-    const unsub = ipcRenderer.on('main:ai-status-changed', (status) => {
+    const unsub = window.ipcRenderer.on('main:ai-status-changed', (status) => {
       setAvailableModels(status?.availableModels || []);
     });
     return () => unsub();
   }, []);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/bruno-app/src/components/AiChatSidebar/index.js` around lines 265 -
273, Update the useEffect handling main:ai-status-changed to remove the
window.ipcRenderer existence guard and use ipcRenderer directly, while
preserving the subscription cleanup and available-model state update.

Source: Learnings

packages/bruno-electron/src/ipc/ai/index.js (1)

96-123: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Inline the broadcastStatus abstraction.

As per coding guidelines, avoid abstractions unless identical code is used in more than three places. broadcastStatus is currently only utilized twice and should be inlined.

♻️ Proposed refactor
-  const broadcastStatus = (status) => {
-    if (mainWindow?.webContents && !mainWindow.webContents.isDestroyed()) {
-      mainWindow.webContents.send('main:ai-status-changed', status);
-    }
-  };
-
   ipcMain.handle('renderer:get-ai-status', async () => buildStatus());
 
   ipcMain.handle('renderer:set-ai-api-key', async (_event, { providerId, apiKey }) => {
     assertKnownProvider(providerId);
     const trimmed = typeof apiKey === 'string' ? apiKey.trim() : '';
     if (!trimmed) {
       throw new Error('API key cannot be empty');
     }
     aiKeyStore.setKey(providerId, trimmed);
     clearSdkCache();
     const status = buildStatus();
-    broadcastStatus(status);
+    if (mainWindow?.webContents && !mainWindow.webContents.isDestroyed()) {
+      mainWindow.webContents.send('main:ai-status-changed', status);
+    }
     return status;
   });
 
   ipcMain.handle('renderer:clear-ai-api-key', async (_event, { providerId }) => {
     assertKnownProvider(providerId);
     aiKeyStore.clearKey(providerId);
     clearSdkCache();
     const status = buildStatus();
-    broadcastStatus(status);
+    if (mainWindow?.webContents && !mainWindow.webContents.isDestroyed()) {
+      mainWindow.webContents.send('main:ai-status-changed', status);
+    }
     return status;
   });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/bruno-electron/src/ipc/ai/index.js` around lines 96 - 123, Remove
the two-use broadcastStatus helper and inline its guarded
mainWindow.webContents.send('main:ai-status-changed', status) logic directly in
the renderer:set-ai-api-key and renderer:clear-ai-api-key handlers after
buildStatus(). Preserve the existing destruction check and status broadcasting
behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/bruno-app/src/components/AiChatSidebar/index.js`:
- Around line 265-273: Update the useEffect handling main:ai-status-changed to
remove the window.ipcRenderer existence guard and use ipcRenderer directly,
while preserving the subscription cleanup and available-model state update.

In `@packages/bruno-electron/src/ipc/ai/index.js`:
- Around line 96-123: Remove the two-use broadcastStatus helper and inline its
guarded mainWindow.webContents.send('main:ai-status-changed', status) logic
directly in the renderer:set-ai-api-key and renderer:clear-ai-api-key handlers
after buildStatus(). Preserve the existing destruction check and status
broadcasting behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a05f99db-cffb-4aeb-9b66-31050e1b5255

📥 Commits

Reviewing files that changed from the base of the PR and between 61ec6d6 and 138243c.

📒 Files selected for processing (10)
  • packages/bruno-app/src/components/AIAssist/StyledWrapper.js
  • packages/bruno-app/src/components/AiChatSidebar/index.js
  • packages/bruno-app/src/components/BulkEditor/index.js
  • packages/bruno-app/src/components/EditableTable/descriptionColumn.js
  • packages/bruno-app/src/components/EnvironmentVariablesTable/index.js
  • packages/bruno-app/src/components/MultiLineEditor/index.js
  • packages/bruno-app/src/components/RequestPane/FileBody/index.js
  • packages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/ResponseExampleResponseHeaders/index.js
  • packages/bruno-app/src/providers/ReduxStore/slices/collections/exampleReducers.js
  • packages/bruno-electron/src/ipc/ai/index.js
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/bruno-app/src/providers/ReduxStore/slices/collections/exampleReducers.js
  • packages/bruno-app/src/components/BulkEditor/index.js
  • packages/bruno-app/src/components/EnvironmentVariablesTable/index.js
  • packages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/ResponseExampleResponseHeaders/index.js

@sid-bruno
sid-bruno force-pushed the fix/description-bulk-edit branch from db904d7 to 8aa4535 Compare July 14, 2026 12:36
and annotations

fix(BulkEditor): preserve hidden metadata during bulk edit roundtrip

fix(ai): refresh chat sidebar model status when provider keys change (usebruno#8581)

* fix(ai): refresh chat sidebar model status when provider keys change

* Added the cropping related issue fix in AI Assist

fix(BulkEditor): enhance metadata preservation during bulk edit roundtrip

fix(styled-wrapper): update placeholder styles to use theme variables

reset
@sid-bruno
sid-bruno force-pushed the fix/description-bulk-edit branch from 8aa4535 to 96a0fe3 Compare July 14, 2026 12:36
@pull-request-size pull-request-size Bot added size/M and removed size/L labels Jul 14, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/bruno-app/src/components/SingleLineEditor/StyledWrapper.js (1)

38-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the extra whitespace in this declaration.

Keep the formatting minimal: opacity: ${(props) => ...} rather than introducing two spaces after opacity:. The semicolon can remain.

As per coding guidelines, avoid unnecessary whitespace-only diffs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/bruno-app/src/components/SingleLineEditor/StyledWrapper.js` at line
38, Remove the extra whitespace after the opacity property’s colon in the styled
declaration within StyledWrapper, keeping the existing value expression and
semicolon unchanged.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/bruno-app/src/components/SingleLineEditor/StyledWrapper.js`:
- Line 38: Remove the extra whitespace after the opacity property’s colon in the
styled declaration within StyledWrapper, keeping the existing value expression
and semicolon unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3cc66c9c-14de-4ec6-a64d-3903d77dec56

📥 Commits

Reviewing files that changed from the base of the PR and between cf1d0f6 and 96a0fe3.

📒 Files selected for processing (11)
  • packages/bruno-app/src/components/BulkEditor/index.js
  • packages/bruno-app/src/components/CodeEditor/StyledWrapper.js
  • packages/bruno-app/src/components/EditableTable/StyledWrapper.js
  • packages/bruno-app/src/components/EditableTable/descriptionColumn.js
  • packages/bruno-app/src/components/EnvironmentVariablesTable/index.js
  • packages/bruno-app/src/components/MultiLineEditor/StyledWrapper.js
  • packages/bruno-app/src/components/MultiLineEditor/index.js
  • packages/bruno-app/src/components/RequestPane/FileBody/index.js
  • packages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/ResponseExampleResponseHeaders/index.js
  • packages/bruno-app/src/components/SingleLineEditor/StyledWrapper.js
  • packages/bruno-app/src/providers/ReduxStore/slices/collections/exampleReducers.js
🚧 Files skipped from review as they are similar to previous changes (7)
  • packages/bruno-app/src/components/EditableTable/StyledWrapper.js
  • packages/bruno-app/src/components/CodeEditor/StyledWrapper.js
  • packages/bruno-app/src/components/MultiLineEditor/StyledWrapper.js
  • packages/bruno-app/src/components/EditableTable/descriptionColumn.js
  • packages/bruno-app/src/providers/ReduxStore/slices/collections/exampleReducers.js
  • packages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/ResponseExampleResponseHeaders/index.js
  • packages/bruno-app/src/components/BulkEditor/index.js

@sid-bruno
sid-bruno merged commit 3c04838 into usebruno:main Jul 14, 2026
14 of 16 checks passed
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.

3 participants