Skip to content

feat(docs): Rich text docs editor - #8559

Merged
sachin-thakur-bruno merged 59 commits into
usebruno:mainfrom
Gopi-bruno:feat/wysiwyg-docs-editor-v2
Jul 30, 2026
Merged

sachin-thakur-bruno merged 59 commits into
usebruno:mainfrom
Gopi-bruno:feat/wysiwyg-docs-editor-v2

Conversation

@Gopi-bruno

@Gopi-bruno Gopi-bruno commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

BRU-695

Description

This PR introduces a brand new WYSIWYG (Rich Text) editor for the Docs tab using Tiptap, providing a seamless, visual editing experience while keeping Markdown as the underlying source of truth.

Users can now format their documentation, create tables, add task lists, and use line-level formatting (bold, italic, etc.) directly via a rich text toolbar without writing raw Markdown, while still being able to toggle back to Markdown mode at any time.

Key Changes

  • WYSIWYG Core & Dependencies:
    • Integrated tiptap and its ecosystem (starter kit, table, task-list, etc.).
    • Added core WYSIWYG components including a custom Toolbar, DocsMarkdownParse, and DocsMarkdownSerialize to seamlessly convert between HTML and Markdown.
  • Docs Tab Integration:
    • Replaced the legacy markdown editor in the Docs tab with the new Rich Text editor.
    • Added docsContentStyles.js to ensure consistent formatting across Markdown and WYSIWYG views.
    • Updated ModeSwitch to easily toggle between Markdown and Rich Text editing.
  • UI Adjustments:
    • Minor styling fixes in MenuDropdown and related components to accommodate the new toolbar and dropdown behaviors.
  • Schema & Parser Updates:
    • Updated bruno-schema, bruno-schema-types, and bruno-lang to properly validate and parse the enhanced docs properties.
  • Testing:
    • Added comprehensive unit tests for markdown serialization and task lists (DocsMarkdownSerialize.spec.js, DocsTaskList.spec.js).
    • Added Playwright E2E tests (wysiwyg-docs.spec.ts) covering mode switching, line-level formatting, markdown table compatibility, and checkbox toggling.

References:

Base PR: #3904

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 a rich WYSIWYG editor for request documentation with formatting, links, images, tables, code blocks, lists, task lists, undo, and redo.
    • Added switching between WYSIWYG and Markdown editing modes with synchronized content.
    • Added documentation edit/preview controls and responsive toolbar behavior.
    • Added support for forwarding authorization headers in request settings.
  • Bug Fixes

    • Improved documentation tab layout, scrolling, link handling, task-list behavior, and table editing.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a TipTap-based WYSIWYG documentation editor with Markdown synchronization, formatting and table controls, task-list support, request-pane integration, responsive UI updates, and optional authorization-header forwarding in collection settings.

Changes

Documentation editor

Layer / File(s) Summary
Markdown and editor foundation
package.json, packages/bruno-app/package.json, packages/bruno-app/src/components/WysiwygEditor/*
Adds TipTap dependencies, custom Markdown parsing/serialization, task-list and hard-break handling, table support, editor extensions, and round-trip tests.
Editor controls and document views
packages/bruno-app/src/components/WysiwygEditor/*
Adds the WYSIWYG editor, toolbar, link modal, table menu, keyboard behavior, task-list interactions, cursor styling, and component tests.
Documentation editing and preview
packages/bruno-app/src/components/Documentation/*, packages/bruno-app/src/components/MarkDown/*, packages/bruno-app/src/components/ModeSwitch/*, tests/request/docs/*
Reworks documentation editing around TipTap, adds Markdown/WYSIWYG switching and Redux synchronization, shares prose styles, and adds Playwright coverage.
Request-pane integration and layout
packages/bruno-app/src/components/RequestPane/*, packages/bruno-app/src/ui/*
Adds Docs actions to request panes, supports multiple active menu items, observes right-content resizing, and updates pane sizing and dropdown states.

Authorization header setting

Layer / File(s) Summary
Authorization header schema and conversion
packages/bruno-schema-types/src/collection/item.ts, packages/bruno-schema/src/collections/index.js, packages/bruno-lang/v2/src/bruToJson.js
Defines optional forwardAuthorizationHeader settings and converts boolean or string input into emitted request settings.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

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

Poem

TipTap turns the docs to bright,
Markdown flows from left to right.
Tables bloom and task checks gleam,
Toolbars guide the writing dream.
Requests gain a setting too—
A polished editor, fresh and new.

🚥 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 is concise and accurately summarizes the main change: a new rich text docs editor experience.
✨ 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.

@Gopi-bruno
Gopi-bruno force-pushed the feat/wysiwyg-docs-editor-v2 branch from 1dcc723 to b3f825f Compare July 10, 2026 07:06

@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: 5

🧹 Nitpick comments (12)
packages/bruno-app/src/ui/MenuDropdown/index.js (1)

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

Add regression coverage for activeItemIds.

Cover multiple active items, coexistence with selectedItemId, and the resulting aria-current/CSS state. This is a new interaction contract used by DocsToolbar.

As per coding guidelines, meaningful behavior changes require behavior-focused tests.

Also applies to: 62-62, 372-385

🤖 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/ui/MenuDropdown/index.js` at line 43, The MenuDropdown
behavior introduced for activeItemIds lacks regression tests. Add
behavior-focused tests covering multiple active item IDs, coexistence with
selectedItemId, and verification of the resulting aria-current attributes and
CSS active state, including the usage path exercised by DocsToolbar.

Source: Coding guidelines

packages/bruno-lang/v2/src/bruToJson.js (2)

560-564: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Inconsistent boolean conversion pattern vs followRedirects.

followRedirects uses the toBool() helper (line 557), but forwardAuthorizationHeader uses a manual typeof check plus === 'true' string comparison. The manual approach is arguably safer for a security-sensitive setting (more restrictive), but the inconsistency may confuse future maintainers. Consider adding a brief comment explaining why toBool() is intentionally avoided here, or unify the approach.

Additionally, the case-sensitive === 'true' check means values like 'True' or 'TRUE' from a .bru file silently map to false. This is acceptable for a security setting but should be documented.

🤖 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-lang/v2/src/bruToJson.js` around lines 560 - 564, Clarify the
intentional boolean parsing behavior in the settings conversion block: update
the handling associated with forwardAuthorizationHeader to either use the shared
toBool() helper consistently with followRedirects, or retain the stricter manual
conversion and add a brief comment documenting its security rationale and
case-sensitive string behavior.

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

Add tests for the new forwardAuthorizationHeader parsing logic.

Per coding guidelines, tests should be added for new functionality. The parsing handles boolean passthrough, string 'true' mapping, and the undefined guard — these are worth covering with unit tests to prevent regressions, especially given the security sensitivity of this setting.

🤖 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-lang/v2/src/bruToJson.js` around lines 595 - 597, Add unit
tests for the forwardAuthorizationHeader handling in the bruToJson parsing
logic, covering boolean passthrough, string "true" conversion, and the undefined
guard. Use the existing parser test setup and assert the resulting settings
value for each case.

Source: Coding guidelines

packages/bruno-app/src/components/Documentation/index.js (2)

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

Unused leftover helper getTabClassname.

This function isn't referenced in the render output (lines 153-227), which now uses ModeSwitch instead of Edit/Preview tab elements. Looks like dead code left over from the previous tab-based implementation.

🧹 Proposed cleanup
-  const getTabClassname = (tabName) => {
-    const isActive = (tabName === 'Edit' && isEditing) || (tabName === 'Preview' && !isEditing);
-    return `docs-tab ${isActive ? 'is-active' : ''}`;
-  };
-
🤖 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/Documentation/index.js` around lines 144 -
147, Remove the unused getTabClassname helper from the Documentation component,
since the render output now uses ModeSwitch and no longer references the legacy
Edit/Preview tab classes.

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

Remove leftover debug console.log calls.

These fire on every docs/isEditing/isMarkdownMode change and dump editor state to the console — clear debug artifacts that shouldn't ship.

🧹 Proposed cleanup
-    console.log('[DEBUG Documentation Sync]', { docs, isEditing, isMarkdownMode });
     editor.commands.setContent(docs || '', false);
-      console.log('[DEBUG Documentation Sync Prev]', { docs, isEditing, isMarkdownMode });
       editor.commands.setContent(docs || '');

Also applies to: 127-127

🤖 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/Documentation/index.js` at line 119, Remove
the leftover debug console.log calls in the Documentation component, including
the “[DEBUG Documentation Sync]” log and the additional call identified at the
corresponding later location, without changing the surrounding synchronization
or editing behavior.
tests/request/docs/wysiwyg-docs.spec.ts (3)

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

Remove debug logging left in the spec.

page.on('console', ...), page.on('pageerror', ...), and the various console.log calls (including a full-page innerHTML dump at line 88) are debug artifacts that will bloat CI logs on every run without adding test value.

🧹 Proposed cleanup
-    page.on('console', (msg) => console.log('PAGE LOG:', msg.text()));
-    page.on('pageerror', (err) => console.log('PAGE ERROR:', err.message));
     const tmpDir = await createTmpDir(collectionName);
-    console.log('Waiting for edit btn...');
     const editBtn = page.locator('.docs-edit-toggle');
     await editBtn.waitFor({ state: 'visible', timeout: 5000 });
     const text = await editBtn.textContent();
-    console.log('Found edit btn text:', text);
-    console.log('Is wysiwyg-editor-content visible?', await wysiwygContent.isVisible());
-    console.log('DOM:', await page.locator('body').innerHTML());
-
     const prosemirror = page.locator('.ProseMirror');

Also applies to: 40-44, 87-88

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

In `@tests/request/docs/wysiwyg-docs.spec.ts` around lines 15 - 16, Remove the
debug listeners and console logging from the WYSIWYG spec, including the page
console/pageerror handlers and all console.log calls such as the full-page
innerHTML dump. Preserve the test behavior and assertions while eliminating only
diagnostic output.

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

Brittle mode-detection via button text content.

Determining edit state by parsing editBtn.textContent() for the substring 'Edit' is fragile compared to a stable attribute (e.g., data-testid/aria-pressed reflecting edit state on DocsAction's button). Once centralized into a page module, prefer a semantic/testid-based check here.

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

In `@tests/request/docs/wysiwyg-docs.spec.ts` around lines 43 - 47, The edit-state
check in the WYSIWYG test is brittle because it parses `editBtn.textContent()`.
Replace this with a stable semantic or test identifier attribute exposed by the
`DocsAction` button, such as `aria-pressed` or a dedicated `data-testid`, and
use that value to decide whether to click the button; remove the debug logging.

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

Wrap test bodies in test.step for readable reports.

None of the five tests use test.step, despite each having multiple distinct arrange/act/assert phases (setup, formatting, toolbar interaction, undo/redo, list/table checks).

As per path instructions, "Promote the use of test.step as much as possible so the generated reports are easier to read."

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

In `@tests/request/docs/wysiwyg-docs.spec.ts` around lines 52 - 171, Wrap the
bodies of all five tests—“Line-Level Formatting,” “Toolbar Tooltips visibility,”
“Text Formatting and Undo/Redo,” “Lists and Code Blocks,” and “Table
Insertion”—in descriptive await test.step blocks separating setup, editor
actions, toolbar interactions, and assertions; preserve the existing behavior
while making each arrange/act/assert phase visible in reports.

Source: Path instructions

packages/bruno-app/package.json (1)

63-63: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Move jsdom to devDependencies The only hits here are the Jest jsdom test setup and a comment; no production import appears to need a runtime jsdom package.

🤖 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/package.json` at line 63, Move the jsdom entry from
dependencies to devDependencies in the package manifest, since it is only used
by the Jest jsdom test setup and not production code.
packages/bruno-app/src/components/WysiwygEditor/DocsMarkdownSerialize.js (1)

60-84: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

Consider guarding state flags with try/finally.

state.inListItem, state.inTightList, and state.inTable are set to true and reset to false without exception protection. If any rendering call between set/reset throws, the flag stays in the wrong state and corrupts subsequent serialization output. Wrapping in try/finally is a low-cost robustness improvement.

♻️ Optional refactor for serializeTable
 const serializeTable = (state, node) => {
   if (!isMarkdownSerializableTable(node)) {
     serializeTableAsHtml(state, node);
     return;
   }

   state.inTable = true;
+  try {
-   node.forEach((row, _p, rowIndex) => {
+    node.forEach((row, _p, rowIndex) => {
       state.write('| ');
       row.forEach((cell, _cp, cellIndex) => {
         if (cellIndex) {
           state.write(' | ');
         }
         serializeTableCell(state, cell);
       });
       state.write(' |');
       state.ensureNewLine();
       if (!rowIndex) {
         const delimiterRow = Array.from({ length: row.childCount })
           .map(() => '---')
           .join(' | ');
         state.write(`| ${delimiterRow} |`);
         state.ensureNewLine();
       }
-   });
+    });
-   state.closeBlock(node);
-   state.inTable = false;
+    state.closeBlock(node);
+  } finally {
+    state.inTable = false;
+  }
 };

Also applies to: 86-102, 183-217

🤖 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/WysiwygEditor/DocsMarkdownSerialize.js`
around lines 60 - 84, Protect serializer state flags with try/finally: update
serializeFlattenedEntryContent and the corresponding list/table serialization
logic at the other marked sections so state.inListItem, state.inTightList, and
state.inTable are always reset even when rendering throws. Set each flag before
entering the existing rendering work, move that work into a try block, and reset
the flag in finally.
packages/bruno-app/src/components/WysiwygEditor/DocsToolbar.js (1)

211-215: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

Use lazy initializer for useState to avoid redundant buildToolbarActions() calls.

useState(buildToolbarActions().length) calls buildToolbarActions() on every render, but the result is only used on the first render. A lazy initializer avoids this.

♻️ Proposed refactor
-  const [visibleCount, setVisibleCount] = useState(buildToolbarActions().length);
+  const [visibleCount, setVisibleCount] = useState(() => buildToolbarActions().length);
   const actions = useMemo(() => buildToolbarActions(), []);
🤖 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/WysiwygEditor/DocsToolbar.js` around lines
211 - 215, Initialize visibleCount lazily in DocsToolbar by passing a function
to useState that computes buildToolbarActions().length, avoiding execution on
every render while preserving the initial value.
packages/bruno-app/src/components/WysiwygEditor/DocsToolbar.spec.js (1)

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

Add state assertions to the undo/redo test.

The test only verifies that clicks don't throw. It should assert that undo reverses the inserted content and redo restores it, otherwise the test passes even if undo/redo is broken.

💚 Proposed fix
   it('calls undo/redo', () => {
     render(
       <ThemeProvider theme={mockTheme}>
         <DocsToolbar editor={editor} />
       </ThemeProvider>
     );
     const undoBtn = screen.getByLabelText('Undo');
     const redoBtn = screen.getByLabelText('Redo');

     // Type to create a history event
     editor.commands.insertContent('foo bar');
     expect(editor.getText()).toContain('foo bar');

     // Test that they click successfully without throwing
     fireEvent.click(undoBtn);
-    // Test that they click successfully without throwing
+    expect(editor.getText()).not.toContain('foo bar');

     fireEvent.click(redoBtn);
+    expect(editor.getText()).toContain('foo bar');
   });
🤖 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/WysiwygEditor/DocsToolbar.spec.js` around
lines 193 - 208, Update the “calls undo/redo” test to assert editor state: after
editor.commands.insertContent('foo bar'), verify the content contains the
inserted text, then click the Undo button and assert it is removed, followed by
clicking Redo and asserting it is restored. Use the editor’s existing
content/state API and retain the button interactions.
🤖 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/ModeSwitch/index.js`:
- Around line 31-34: Replace the hardcoded active-state background and text
colors in the ModeSwitch styled component’s `.is-active` rule with the
appropriate `props.theme` color values, matching the theme-based pattern used by
`Documentation/StyledWrapper.js`’s `.docs-tab.is-active` styling.

In `@packages/bruno-app/src/components/WysiwygEditor/DocsTaskList.js`:
- Around line 151-241: Guard against a missing node in toggleCheckbox before
accessing its attributes or nodeSize. After tr.doc.nodeAt(position), return
early when currentNode is null; then use currentNode.attrs for setNodeMarkup and
currentNode.nodeSize to calculate the mark range, preserving all existing
attributes.

In `@packages/bruno-app/src/components/WysiwygEditor/DocsToolbar.spec.js`:
- Around line 19-23: Restore the original global.ResizeObserver after the tests
complete. In DocsToolbar.spec.js, capture its pre-test value before assigning
the mock, then add an afterAll cleanup that reinstates the captured value (or
deletes the property if it was originally undefined), preventing leakage between
Jest test files.

In `@packages/bruno-app/src/ui/MenuDropdown/index.js`:
- Around line 202-209: Remove the active/selection/disabled-state-based remount
key from the menu rendering logic around menuStateKey in MenuDropdown. Keep the
menu subtree mounted while selectedItemId, activeItemIds, or item disabled
states change, allowing it to update in place without losing focus or keyboard
navigation.

In `@tests/request/docs/wysiwyg-docs.spec.ts`:
- Around line 30-31: Centralize all editor, toolbar, tab, tooltip, and related
selectors used by the WYSIWYG docs spec into a dedicated page module under
tests/utils/page, including locators such as docsTab, moreTabs, ProseMirror,
toolbar buttons, heading dropdown, docs edit toggle, and react-tooltip. Expose
the module through buildCommonLocators and update the spec to use those
page-module locators and interactions, leaving only expect(...) assertions in
the spec.

---

Nitpick comments:
In `@packages/bruno-app/package.json`:
- Line 63: Move the jsdom entry from dependencies to devDependencies in the
package manifest, since it is only used by the Jest jsdom test setup and not
production code.

In `@packages/bruno-app/src/components/Documentation/index.js`:
- Around line 144-147: Remove the unused getTabClassname helper from the
Documentation component, since the render output now uses ModeSwitch and no
longer references the legacy Edit/Preview tab classes.
- Line 119: Remove the leftover debug console.log calls in the Documentation
component, including the “[DEBUG Documentation Sync]” log and the additional
call identified at the corresponding later location, without changing the
surrounding synchronization or editing behavior.

In `@packages/bruno-app/src/components/WysiwygEditor/DocsMarkdownSerialize.js`:
- Around line 60-84: Protect serializer state flags with try/finally: update
serializeFlattenedEntryContent and the corresponding list/table serialization
logic at the other marked sections so state.inListItem, state.inTightList, and
state.inTable are always reset even when rendering throws. Set each flag before
entering the existing rendering work, move that work into a try block, and reset
the flag in finally.

In `@packages/bruno-app/src/components/WysiwygEditor/DocsToolbar.js`:
- Around line 211-215: Initialize visibleCount lazily in DocsToolbar by passing
a function to useState that computes buildToolbarActions().length, avoiding
execution on every render while preserving the initial value.

In `@packages/bruno-app/src/components/WysiwygEditor/DocsToolbar.spec.js`:
- Around line 193-208: Update the “calls undo/redo” test to assert editor state:
after editor.commands.insertContent('foo bar'), verify the content contains the
inserted text, then click the Undo button and assert it is removed, followed by
clicking Redo and asserting it is restored. Use the editor’s existing
content/state API and retain the button interactions.

In `@packages/bruno-app/src/ui/MenuDropdown/index.js`:
- Line 43: The MenuDropdown behavior introduced for activeItemIds lacks
regression tests. Add behavior-focused tests covering multiple active item IDs,
coexistence with selectedItemId, and verification of the resulting aria-current
attributes and CSS active state, including the usage path exercised by
DocsToolbar.

In `@packages/bruno-lang/v2/src/bruToJson.js`:
- Around line 560-564: Clarify the intentional boolean parsing behavior in the
settings conversion block: update the handling associated with
forwardAuthorizationHeader to either use the shared toBool() helper consistently
with followRedirects, or retain the stricter manual conversion and add a brief
comment documenting its security rationale and case-sensitive string behavior.
- Around line 595-597: Add unit tests for the forwardAuthorizationHeader
handling in the bruToJson parsing logic, covering boolean passthrough, string
"true" conversion, and the undefined guard. Use the existing parser test setup
and assert the resulting settings value for each case.

In `@tests/request/docs/wysiwyg-docs.spec.ts`:
- Around line 15-16: Remove the debug listeners and console logging from the
WYSIWYG spec, including the page console/pageerror handlers and all console.log
calls such as the full-page innerHTML dump. Preserve the test behavior and
assertions while eliminating only diagnostic output.
- Around line 43-47: The edit-state check in the WYSIWYG test is brittle because
it parses `editBtn.textContent()`. Replace this with a stable semantic or test
identifier attribute exposed by the `DocsAction` button, such as `aria-pressed`
or a dedicated `data-testid`, and use that value to decide whether to click the
button; remove the debug logging.
- Around line 52-171: Wrap the bodies of all five tests—“Line-Level Formatting,”
“Toolbar Tooltips visibility,” “Text Formatting and Undo/Redo,” “Lists and Code
Blocks,” and “Table Insertion”—in descriptive await test.step blocks separating
setup, editor actions, toolbar interactions, and assertions; preserve the
existing behavior while making each arrange/act/assert phase visible in reports.
🪄 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: 76672990-fb30-46af-bf48-1b47bbb21c53

📥 Commits

Reviewing files that changed from the base of the PR and between 8ceaf72 and 8fd41a9.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (40)
  • package.json
  • packages/bruno-app/package.json
  • packages/bruno-app/src/components/Documentation/DocsAction.js
  • packages/bruno-app/src/components/Documentation/StyledWrapper.js
  • packages/bruno-app/src/components/Documentation/docsContentStyles.js
  • packages/bruno-app/src/components/Documentation/index.js
  • packages/bruno-app/src/components/Dropdown/StyledWrapper.js
  • packages/bruno-app/src/components/MarkDown/StyledWrapper.js
  • packages/bruno-app/src/components/MarkDown/index.jsx
  • packages/bruno-app/src/components/ModeSwitch/index.js
  • packages/bruno-app/src/components/RequestPane/GraphQLRequestPane/index.js
  • packages/bruno-app/src/components/RequestPane/GrpcRequestPane/index.js
  • packages/bruno-app/src/components/RequestPane/HttpRequestPane/index.js
  • packages/bruno-app/src/components/RequestPane/WSRequestPane/index.js
  • packages/bruno-app/src/components/RequestTabPanel/index.js
  • packages/bruno-app/src/components/WysiwygEditor/DocsGapCursor.js
  • packages/bruno-app/src/components/WysiwygEditor/DocsHardBreak.js
  • packages/bruno-app/src/components/WysiwygEditor/DocsListKeyboard.js
  • packages/bruno-app/src/components/WysiwygEditor/DocsMarkdownParse.js
  • packages/bruno-app/src/components/WysiwygEditor/DocsMarkdownParse.spec.js
  • packages/bruno-app/src/components/WysiwygEditor/DocsMarkdownSerialize.js
  • packages/bruno-app/src/components/WysiwygEditor/DocsMarkdownSerialize.spec.js
  • packages/bruno-app/src/components/WysiwygEditor/DocsTableKeyboard.js
  • packages/bruno-app/src/components/WysiwygEditor/DocsTableMenu.js
  • packages/bruno-app/src/components/WysiwygEditor/DocsTableView.js
  • packages/bruno-app/src/components/WysiwygEditor/DocsTaskList.js
  • packages/bruno-app/src/components/WysiwygEditor/DocsTaskList.spec.js
  • packages/bruno-app/src/components/WysiwygEditor/DocsToolbar.js
  • packages/bruno-app/src/components/WysiwygEditor/DocsToolbar.spec.js
  • packages/bruno-app/src/components/WysiwygEditor/StyledWrapper.js
  • packages/bruno-app/src/components/WysiwygEditor/ToolbarStyledWrapper.js
  • packages/bruno-app/src/components/WysiwygEditor/docsToolbarUi.js
  • packages/bruno-app/src/components/WysiwygEditor/extensions.js
  • packages/bruno-app/src/components/WysiwygEditor/index.js
  • packages/bruno-app/src/ui/MenuDropdown/index.js
  • packages/bruno-app/src/ui/ResponsiveTabs/index.js
  • packages/bruno-lang/v2/src/bruToJson.js
  • packages/bruno-schema-types/src/collection/item.ts
  • packages/bruno-schema/src/collections/index.js
  • tests/request/docs/wysiwyg-docs.spec.ts

Comment thread tests/request/docs/wysiwyg-docs.spec.ts Resolved
@coderabbitai coderabbitai Bot mentioned this pull request Jul 30, 2026
7 tasks
bijin-bruno
bijin-bruno previously approved these changes Jul 30, 2026

@sachin-thakur-bruno sachin-thakur-bruno left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

working fine

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.

5 participants