Skip to content

feat:Added collection name and minor UI changes to the generate doc modal#8391

Open
sachin-bruno wants to merge 3 commits into
usebruno:mainfrom
sachin-bruno:sachin-bruno/feature-environment-selection
Open

feat:Added collection name and minor UI changes to the generate doc modal#8391
sachin-bruno wants to merge 3 commits into
usebruno:mainfrom
sachin-bruno:sachin-bruno/feature-environment-selection

Conversation

@sachin-bruno

@sachin-bruno sachin-bruno commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Description

Problem
Generated documentation includes every environment in the collection, with no way to scope which envs ship, so internal, local, or staging envs leak into docs shared externally. The modal also doesn't surface which collection version the docs represent.

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.
image

Summary by CodeRabbit

  • New Features

    • The Generate Documentation modal now shows the collection name alongside version details.
    • Environment availability is now displayed more clearly, including a “0 environments” message when none are present.
  • UI Improvements

    • Version, folder, request, and environment details are presented in a cleaner, more readable layout.
    • The environment selection list now shows more items at once.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

CollectionVersionInfo gains name and environmentCount props, rendering the collection name in a dedicated slot and raw version string (dropping semver normalization). Count summary splits into discrete spans with dot separators, with a conditional 0 environments segment. The modal passes the new props through, drops its fixed width class, and styling updates adjust card tokens and environment list row height.

Changes

Generate Documentation Modal

Layer / File(s) Summary
CollectionVersionInfo props, markup, and tests
...CollectionVersionInfo/index.js, ...CollectionVersionInfo/index.spec.js, .../GenerateDocumentation/index.js, tests/utils/page/locators.ts, tests/collection/generate-docs/generate-docs.spec.ts
Props expanded with name and environmentCount; header renders collection name and raw version string; summary uses discrete dot-separated spans with conditional 0 environments text; modal passes new props; locators and e2e tests updated to match.
Modal card and version-line styling
...StyledWrapper.js, .../GenerateDocumentation/index.js
StyledWrapper drops fixed w-[500px] class; .config-card border/divider tokens updated; version-line flex layout and typography rules added.
Environment list sizing and typography
...EnvironmentSelectionList/index.js, ...StyledWrapper.js
MAX_VISIBLE_ROWS increased to 6, ENV_ROW_HEIGHT reduced to 28px; env section header margin, count/title colors, select-all label color, and .env-row height/font updated to match.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • usebruno/bruno#6583: Introduces the GenerateDocumentation modal that this PR directly modifies.
  • usebruno/bruno#8268: Previously modified CollectionVersionInfo — same component receiving the name and environmentCount props in this PR.

Suggested reviewers

  • bijin-bruno
  • lohit-bruno
  • sid-bruno

Poem

A name finds its home in a tidy new span,
raw versions replace the old semver plan.
Dots separate folders and requests with grace,
0 environments gets its own quiet space.
28px rows, six visible now — 🎉
the docs modal tidied, take a bow!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: adding the collection name to the Generate Documentation modal with related UI updates.
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.
✨ 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.

@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/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js (1)

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

.collection-name needs truncation rules to back up min-width: 0.

min-width: 0 only enables shrinking — on its own it does nothing visible. A long collection name will wrap or push the nowrap version off the line. Add ellipsis truncation to finish the job.

♻️ Proposed fix
         .collection-name {
           font-weight: 500;
           font-size: ${(props) => props.theme.font.size.base};
           color: ${(props) => props.theme.text};
           min-width: 0;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
         }
🤖 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/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js`
around lines 33 - 38, The .collection-name style in StyledWrapper only sets
min-width: 0, which allows shrinking but does not truncate long text. Update the
collection-name rule to include the usual ellipsis truncation behavior so long
names do not wrap or overflow; keep the fix scoped to the collection-name
selector in StyledWrapper.js.
🤖 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/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js`:
- Around line 33-38: The .collection-name style in StyledWrapper only sets
min-width: 0, which allows shrinking but does not truncate long text. Update the
collection-name rule to include the usual ellipsis truncation behavior so long
names do not wrap or overflow; keep the fix scoped to the collection-name
selector in StyledWrapper.js.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 110aa513-11ef-4a54-bf1a-8fee93cc212b

📥 Commits

Reviewing files that changed from the base of the PR and between 30b4512 and b918dbe.

📒 Files selected for processing (7)
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/CollectionVersionInfo/index.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/CollectionVersionInfo/index.spec.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/EnvironmentSelectionList/index.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/index.js
  • tests/collection/generate-docs/generate-docs.spec.ts
  • tests/utils/page/locators.ts

@pull-request-size pull-request-size Bot added size/M and removed size/L labels Jun 26, 2026
@pull-request-size pull-request-size Bot added size/L and removed size/M labels Jun 29, 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/Sidebar/Collections/Collection/GenerateDocumentation/CollectionVersionInfo/index.js`:
- Around line 11-12: The version display in CollectionVersionInfo is adding a
prefixed label instead of showing the raw collection version. Update the render
logic in the version-value span so it outputs the version prop verbatim,
matching the value passed from the modal, and keep the existing conditional
around version in place.

In
`@packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/CollectionVersionInfo/index.spec.js`:
- Around line 7-38: Add a test in CollectionVersionInfo’s spec to cover the new
collection name element rendered by CollectionVersionInfo, since the current
suite only checks version and summary text. Update index.spec.js to assert the
presence and content of the collection-name output for a rendered name prop, and
include a negative/edge case if the component hides it conditionally.
🪄 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: 9fb0ef94-613a-4063-a17a-26f23d0cbabc

📥 Commits

Reviewing files that changed from the base of the PR and between b918dbe and 1546bdc.

📒 Files selected for processing (4)
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/CollectionVersionInfo/index.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/CollectionVersionInfo/index.spec.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/index.js
  • tests/collection/generate-docs/generate-docs.spec.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/GenerateDocumentation/index.js
  • tests/collection/generate-docs/generate-docs.spec.ts

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