Skip to content

fix(lightspeed): preserve indentation for lists in chatbot#3083

Open
Jdubrick wants to merge 3 commits intoredhat-developer:mainfrom
Jdubrick:fix-chatbot-lists
Open

fix(lightspeed): preserve indentation for lists in chatbot#3083
Jdubrick wants to merge 3 commits intoredhat-developer:mainfrom
Jdubrick:fix-chatbot-lists

Conversation

@Jdubrick
Copy link
Copy Markdown
Contributor

@Jdubrick Jdubrick commented May 8, 2026

Hey, I just made a Pull Request!

✔️ Checklist

  • Preserves the indentation for lists in the chatbot window

Before
Screenshot 2026-05-08 at 2 10 50 PM

After
Screenshot 2026-05-08 at 2 19 30 PM

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

Jdubrick added 2 commits May 8, 2026 14:52
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@rhdh-qodo-merge
Copy link
Copy Markdown

rhdh-qodo-merge Bot commented May 8, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Advisory comments

1. Misleading CSS reset comment ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
In LightSpeedChat.tsx, the comment says the style “remove[s] default margin and padding from common
elements”, but the selector intentionally no longer targets ul/ol. This mismatch makes it unclear
that lists were excluded on purpose (to preserve indentation), increasing the chance of an
accidental regression later.
Code

workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx[R139-144]

  body: {
    // remove default margin and padding from common elements
-    '& h1, & h2, & h3, & h4, & h5, & h6, & p, & ul, & ol, & li': {
+    '& h1, & h2, & h3, & h4, & h5, & h6, & p, & li': {
      margin: 0,
      padding: 0,
    },
Evidence
The body style block’s comment claims a general reset, but the selector now only resets
headings/paragraphs/list-items and explicitly does not include ul/ol, which is the key
behavioral change in this PR.

workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx[138-145]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
A comment in `useStyles.body` claims to remove default margin/padding from “common elements”, but `ul`/`ol` are no longer included. This makes the intent (preserve list indentation) easy to miss and easy to accidentally undo.

### Issue Context
This PR intentionally removed `ul` and `ol` from the reset selector to preserve indentation for lists in chat messages.

### Fix Focus Areas
- workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx[138-145]

### Suggested fix
Update the comment to explicitly state that `ul/ol` are excluded to preserve list indentation (and optionally explain why `li` is still reset).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@rhdh-gh-app
Copy link
Copy Markdown

rhdh-gh-app Bot commented May 8, 2026

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-lightspeed workspaces/lightspeed/plugins/lightspeed patch v2.7.0

@rhdh-qodo-merge
Copy link
Copy Markdown

Review Summary by Qodo

Preserve list indentation in chatbot by excluding from CSS reset

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Exclude list elements (ul, ol) from CSS reset
• Preserve indentation for lists in chatbot window
• Prevents flattening of list styling and structure
Diagram
flowchart LR
  A["CSS Reset Selector"] -->|"Remove ul, ol"| B["Preserve List Indentation"]
  B --> C["Improved Chat Display"]
Loading

Grey Divider

File Changes

1. workspaces/lightspeed/.changeset/plenty-dolphins-sniff.md 📝 Documentation +5/-0

Changeset for list indentation fix

• Added changeset entry for patch version bump
• Documents fix for list indentation preservation

workspaces/lightspeed/.changeset/plenty-dolphins-sniff.md


2. workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx 🐞 Bug fix +1/-1

Exclude lists from CSS reset styling

• Removed ul and ol from CSS reset selector
• Keeps li in selector to maintain list item styling
• Allows list elements to retain their default indentation

workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx


Grey Divider

Qodo Logo

@rhdh-qodo-merge rhdh-qodo-merge Bot added documentation Improvements or additions to documentation Bug fix labels May 8, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.00%. Comparing base (ca84f13) to head (82f585b).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3083   +/-   ##
=======================================
  Coverage   61.00%   61.00%           
=======================================
  Files        2069     2069           
  Lines       64043    64043           
  Branches    16620    16620           
=======================================
  Hits        39070    39070           
  Misses      24801    24801           
  Partials      172      172           
Flag Coverage Δ *Carryforward flag
adoption-insights 83.58% <ø> (ø) Carriedforward from 2e6a1a4
ai-integrations 70.03% <ø> (ø) Carriedforward from 2e6a1a4
app-defaults 69.60% <ø> (ø) Carriedforward from 2e6a1a4
augment 69.36% <ø> (ø) Carriedforward from 2e6a1a4
bulk-import 72.44% <ø> (ø) Carriedforward from 2e6a1a4
cost-management 16.49% <ø> (ø) Carriedforward from 2e6a1a4
dcm 32.85% <ø> (ø) Carriedforward from 2e6a1a4
extensions 61.79% <ø> (ø) Carriedforward from 2e6a1a4
global-floating-action-button 73.75% <ø> (ø) Carriedforward from 2e6a1a4
global-header 61.68% <ø> (ø) Carriedforward from 2e6a1a4
homepage 50.84% <ø> (ø) Carriedforward from 2e6a1a4
konflux 91.01% <ø> (ø) Carriedforward from 2e6a1a4
lightspeed 70.36% <ø> (ø)
mcp-integrations 81.59% <ø> (ø) Carriedforward from 2e6a1a4
orchestrator 34.83% <ø> (ø) Carriedforward from 2e6a1a4
quickstart 62.64% <ø> (ø) Carriedforward from 2e6a1a4
sandbox 79.56% <ø> (ø) Carriedforward from 2e6a1a4
scorecard 83.61% <ø> (ø) Carriedforward from 2e6a1a4
theme 64.54% <ø> (ø) Carriedforward from 2e6a1a4
translations 8.49% <ø> (ø) Carriedforward from 2e6a1a4
x2a 82.09% <ø> (ø) Carriedforward from 2e6a1a4

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca84f13...82f585b. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug fix documentation Improvements or additions to documentation workspace/lightspeed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant