crbench//

← all cases

Optimize header layout performance with flexbox mixins

Tier 2 easy ruby · local · real merged PR from ai-code-review-evaluation/discourse-graphite #5

Ground-truth defects

d1 · correctness · low
Wrapping `.small-action` in `@include flexbox()` (topic-post.scss) silently breaks the layout of its children. `.small-action` still contains the pre-existing `button { float: right }`, `.topic-avatar { float: left }`, and `clear: both`, but floats are ignored on flex items, so the action button is no longer right-aligned and the avatar/desc layout collapses. This is the flexbox side-effect that forced the upstream revert.

The change under review

diff
diff --git a/app/assets/stylesheets/common/base/header.scss b/app/assets/stylesheets/common/base/header.scss
index ed398f4a06..99c579f278 100644
--- a/app/assets/stylesheets/common/base/header.scss
+++ b/app/assets/stylesheets/common/base/header.scss
@@ -13,10 +13,9 @@
 
     .contents {
       margin: 8px 0;
-    }
 
-    .title {
-      float: left;
+      @include flexbox();
+      @include align-items(center);
     }
 
     .valign-helper {
@@ -34,8 +33,10 @@
     }
 
     .panel {
-      float: right;
       position: relative;
+      margin-left: auto;
+
+      @include order(3);
     }
 
     .login-button, button.sign-up-button {
diff --git a/app/assets/stylesheets/common/base/topic-post.scss b/app/assets/stylesheets/common/base/topic-post.scss
index ec590ae39c..95461d8ca5 100644
--- a/app/assets/stylesheets/common/base/topic-post.scss
+++ b/app/assets/stylesheets/common/base/topic-post.scss
@@ -261,6 +261,9 @@ table.md-table {
 }
 
 .small-action {
+  @include flexbox();
+  @include align-items(center);
+
   .topic-avatar {
     padding: 5px 0;
     border-top: none;
@@ -274,8 +277,7 @@ table.md-table {
   }
 
   .small-action-desc {
-    padding: 0.5em 0 0.5em 4em;
-    margin-top: 5px;
+    padding: 0 1.5%;
     text-transform: uppercase;
     font-weight: bold;
     font-size: 0.9em;
@@ -287,7 +289,7 @@ table.md-table {
       font-weight: normal;
       font-size: 14px;
       p {
-        margin: 5px 0;
+        margin: 0;
       }
     }
 
@@ -298,7 +300,6 @@ table.md-table {
 
     > p {
       margin: 0;
-      padding-top: 4px;
     }
   }
 
diff --git a/app/assets/stylesheets/common/base/topic.scss b/app/assets/stylesheets/common/base/topic.scss
index 18701110bc..fc1fee069e 100644
--- a/app/assets/stylesheets/common/base/topic.scss
+++ b/app/assets/stylesheets/common/base/topic.scss
@@ -27,11 +27,11 @@
 }
 
 .extra-info-wrapper {
+  @include order(2);
+
+  line-height: 1.5;
   .badge-wrapper {
     float: left;
-    &.bullet {
-      margin-top: 5px;
-    }
   }
 
 }
diff --git a/app/assets/stylesheets/common/components/badges.css.scss b/app/assets/stylesheets/common/components/badges.css.scss
index 8008d48b21..fb683d8719 100644
--- a/app/assets/stylesheets/common/components/badges.css.scss
+++ b/app/assets/stylesheets/common/components/badges.css.scss
@@ -52,8 +52,10 @@
 
 
   &.bullet { //bullet category style
-    display: inline-flex;
-    align-items: baseline;
+    @include inline-flex();
+
+    @include align-items(baseline);
+
     margin-right: 10px;
 
     span.badge-category {
diff --git a/app/assets/stylesheets/common/foundation/mixins.scss b/app/assets/stylesheets/common/foundation/mixins.scss
index 60a682ac09..9eb1a27ca2 100644
--- a/app/assets/stylesheets/common/foundation/mixins.scss
+++ b/app/assets/stylesheets/common/foundation/mixins.scss
@@ -92,3 +92,40 @@
      -moz-user-select: none;
       -ms-user-select: none;
 }
+
+// ---------------------------------------------------
+
+//Flexbox
+
+@mixin flexbox() {
+  display: -webkit-box;
+  display: -moz-box;
+  display: -ms-flexbox;
+  display: -webkit-flex;
+  display: flex;
+}
+
+@mixin inline-flex() {
+  display: -webkit-inline-box;
+  display: -webkit-inline-flex;
+  display: -moz-inline-box;
+  display: -ms-inline-flexbox;
+  display: inline-flex;
+}
+
+
+@mixin align-items($alignment) {
+    -webkit-box-align: $alignment;
+    -webkit-align-items: $alignment;
+    -ms-flex-align: $alignment;  
+    -ms-align-items: $alignment;
+    align-items:$alignment;
+}
+
+@mixin order($val) {
+  -webkit-box-ordinal-group: $val;
+  -moz-box-ordinal-group: $val;
+  -ms-flex-order: $val;
+  -webkit-order: $val;
+  order: $val;
+}

Leaderboard for this case

easy · 6 of 9 bots fully caught it (67% solve rate) · 67% avg coverage.

#BotResultCaughtCoverageFindingsFalse alarms
1 Cubic solved 1/1 100.0% 1 0
2 cursor solved 1/1 100.0% 2 0
3 Drape (Deep Review) solved 1/1 100.0% 3 0
4 Drape (Review) solved 1/1 100.0% 2 0
5 Mjolnir (Opus 5.5) solved 1/1 100.0% 3 0
6 qodo solved 1/1 100.0% 1 0
7 Claude Code (Opus 5.5) miss 0/1 0.0% 3 0
8 greptile miss 0/1 0.0% 2 0
9 Mjolnir (Sonnet 5.5) miss 0/1 0.0% 2 0

Bot results

Claude Code (Opus 5.5) · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 low ✗ —
valid · impact medium
The mobile stylesheet still has `.small-action .small-action-desc .custom-message { margin-left: -40px; }` (mobile/topic-post.scss:520-521), and nothing on mobile overrides the desc padding. That negative margin was cancelling the old 4em left padding. With the padding cut to 1.5%, custom messages now get pulled about 40px to the left on mobile. [grounded: diff] [consensus 3/3: valid=3]
valid · impact low
header.hbs gives `.contents` the `clearfix` class, so its ::before/::after pseudo-elements do become flex items once the element is a flex container. They are empty and the panel uses margin-left:auto, so the visible effect is probably tiny. Still, the stray items are real and this change creates them. [grounded: diff] [consensus 3/5: valid=3, uncertain=2]
valid · impact low
`-ms-align-items` is not a real property, but browsers just ignore it, so it does no harm. The -webkit-box-align problem only happens with flex-start/flex-end, and no current caller passes those (they pass center and baseline). No rendering bug happens today. [grounded: diff] [consensus 3/3: valid=3]
raw comments (3)
app/assets/stylesheets/common/base/topic-post.scss:280
`.small-action-desc` used to have `padding: 0.5em 0 0.5em 4em`. This change replaces it with `padding: 0 1.5%`, which removes the ~4em left indent. The mobile stylesheet (mobile/topic-post.scss:520) still sets `.custom-message { margin-left: -40px; }`, which only made sense to cancel out that old indent. With the indent gone, the negative margin pushes custom small-action messages about 40px left on mobile, overlapping the icon or overflowing the post. Remove or update the mobile rule along with this change.
app/assets/stylesheets/common/base/header.scss:17
`.contents` has the `clearfix` class in header.hbs, which adds `::before`/`::after` pseudo-elements with `display: table`. Now that `.contents` is a flex container, those pseudo-elements become empty flex items. Neither has an explicit order, so they sit among the logo, `.extra-info-wrapper` (order 2) and `.panel` (order 3), and can add stray spacing or alignment quirks. With floats gone the clearfix isn't needed, so drop it from the template or neutralise the pseudo-elements.
app/assets/stylesheets/common/foundation/mixins.scss:120
The `align-items` mixin outputs `-ms-align-items`, which is not a real property, so it does nothing. Also, `-webkit-box-align` (old flexbox syntax) only accepts start/end/center/baseline/stretch. The current callers pass `center` and `baseline`, which work, but a future caller passing `flex-start` or `flex-end` would get invalid legacy output with no warning.
Cubic · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 low ✓ off by one
valid · matches d1 · impact low
raw comments (2)
app/assets/stylesheets/common/base/topic-post.scss:280
<!-- cubic:v=e6e98935-7237-4e1d-a8c3-efa972378482 --> <!-- cubic:review-run=14737d2c-40d8-5e6d-9360-85559e23edda --> <!-- metadata:{"confidence":6} --> P2: When the description is short relative to the row, `.small-action-desc` now shrink-wraps to its content instead of filling the row width, so the floated edit/delete buttons (`button { float: right }`, rendered inside `.small-action-desc` per small-action.hbs) no longer sit at the right edge of the action row. Previously the block-level `.small-action-desc` spanned the full width and the float reached the far right. Add `flex: 1` so the description fills the remaining flex space and keeps the buttons right-aligned. <details> <summary>Prompt for AI agents</summary> ```text Check if this issue is valid — if so, understand the root cause and fix it. At app/assets/stylesheets/common/base/topic-post.scss, line 280: <comment>When the description is short relative to the row, `.small-action-desc` now shrink-wraps to its content instead of filling the row width, so the floated edit/delete buttons (`button { float: right }`, rendered inside `.small-action-desc` per small-action.hbs) no longer sit at the right edge of the action row. Previously the block-level `.small-action-desc` spanned the full width and the float reached the far right. Add `flex: 1` so the description fills the remaining flex space and keeps the buttons right-aligned.</comment> <file context> @@ -274,8 +277,7 @@ table.md-table { .small-action-desc { - padding: 0.5em 0 0.5em 4em; - margin-top: 5px; + padding: 0 1.5%; text-transform: uppercase; font-weight: bold; </file context> ``` </details> ```suggestion flex: 1 1 auto; padding: 0 1.5%; ```
PR-level
<!-- cubic:review-summary:start --> **1 issue found** across 5 files <!-- cubic:review-summary:end --> <details> <summary>Prompt for AI agents (unresolved issues)</summary> ```text Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately. <file name="app/assets/stylesheets/common/base/topic-post.scss"> <violation number="1" location="app/assets/stylesheets/common/base/topic-post.scss:280"> P2: When the description is short relative to the row, `.small-action-desc` now shrink-wraps to its content instead of filling the row width, so the floated edit/delete buttons (`button { float: right }`, rendered inside `.small-action-desc` per small-action.hbs) no longer sit at the right edge of the action row. Previously the block-level `.small-action-desc` spanned the full width and the float reached the far right. Add `flex: 1` so the description fills the remaining flex space and keeps the buttons right-aligned.</violation> </file> ``` </details> <sub>Reply with feedback, questions, or to request a fix.<br /><br />[Re-trigger cubic](https://www.cubic.dev/action/re-review/pr/drape-io/crbench-cubic-2026-09/34/ai_pr_review_github_delivery_e4c23eebc169df2620dd76dc0cdda1ae6fcc87dbca5bb7adc8c85552ac546664?returnTo=https%3A%2F%2Fgithub.com%2Fdrape-io%2Fcrbench-cubic-2026-09%2Fpull%2F34)</sub> <!-- cubic:review-post:ai_pr_review_github_delivery_e4c23eebc169df2620dd76dc0cdda1ae6fcc87dbca5bb7adc8c85552ac546664:6ee369cefae0954951c5146bac61df16f0c4b405:14737d2c-40d8-5e6d-9360-85559e23edda -->
cursor · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 low ✓ off by one
valid · matches d1 · impact low
valid · impact low
The mobile stylesheet still sets `.small-action .small-action-desc .custom-message { margin-left: -40px; }`. That offset only made sense against the old `padding: 0.5em 0 0.5em 4em`, which this diff changed to `padding: 0 1.5%`. So the custom message now gets pulled left over the avatar in the new flex layout. [grounded: tree app/assets/stylesheets/mobile/topic-post.scss] [consensus 5/5: valid=5]
raw comments (3)
app/assets/stylesheets/common/base/topic-post.scss:301
### Small-action row no longer fills width **Medium Severity** <!-- DESCRIPTION START --> `.small-action` is now a flex container, but `.small-action-desc` has no grow/basis so it shrinks to its content instead of filling the row. Edit/delete `button`s still `float: right` inside that shrink-wrapped box, so they sit beside the text (or overlap it) rather than at the right edge of the post column. <!-- DESCRIPTION END --> <!-- BUGBOT_BUG_ID: f80a0a32-ffb4-4a67-a79b-d5c0bb5c660a --> <!-- LOCATIONS START app/assets/stylesheets/common/base/topic-post.scss#L262-L310 LOCATIONS END --> <div><a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmQyMWIyMGVlLTRhOGItNGM4ZS1iNTk4LTRhYTFjODRhOGFmMiIsImVuY3J5cHRpb25LZXkiOiJ5cGxfZTdYZEd6a3FaRVJSeEpwdV9ETkQ5dFFTNkxlNXBqTS1BaDR3ZVhjIiwiYnJhbmNoIjoidDItZGlzY291cnNlLWdyYXBoaXRlLTUiLCJyZXBvT3duZXIiOiJkcmFwZS1pbyIsInJlcG9OYW1lIjoiY3JiZW5jaC1jdXJzb3ItMjAyNi0wOSIsInByb3ZpZGVyIjoiZ2l0aHViIn19" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmQyMWIyMGVlLTRhOGItNGM4ZS1iNTk4LTRhYTFjODRhOGFmMiIsImVuY3J5cHRpb25LZXkiOiJ5cGxfZTdYZEd6a3FaRVJSeEpwdV9ETkQ5dFFTNkxlNXBqTS1BaDR3ZVhjIiwiYnJhbmNoIjoidDItZGlzY291cnNlLWdyYXBoaXRlLTUiLCJyZXBvT3duZXIiOiJkcmFwZS1pbyIsInJlcG9OYW1lIjoiY3JiZW5jaC1jdXJzb3ItMjAyNi0wOSIsInByTnVtYmVyIjozNSwiY29tbWl0U2hhIjoiYWQ3MTVmNTEzZWRjYmY0NDIxMTM1Nzc3YzcwNTc4Y2JmMTBjMzNkNSIsInByb3ZpZGVyIjoiZ2l0aHViIn19" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-web-light.png"><img alt="Fix in Web" width="99" height="28" src="https://cursor.com/assets/images/fix-in-web-dark.png"></picture></a></div> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ad715f513edcbf4421135777c70578cbf10c33d5. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
app/assets/stylesheets/common/base/topic-post.scss:280
### Custom message overlaps avatar on mobile **Medium Severity** <!-- DESCRIPTION START --> Left padding on `.small-action-desc` changed from `4em` to `0 1.5%`, but mobile still applies `margin-left: -40px` on `.custom-message` to offset that old padding. The cooked custom message now pulls 40px over the avatar instead of lining up with the action text. <!-- DESCRIPTION END --> <!-- BUGBOT_BUG_ID: 0a9cb07e-6886-4be6-8cb1-bff5a1b7c1db --> <!-- LOCATIONS START app/assets/stylesheets/common/base/topic-post.scss#L278-L280 LOCATIONS END --> <div><a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmM1NzRiMDdjLThhMWYtNDRmMy04ZDVhLWI2Y2VlZGFhNjA3ZSIsImVuY3J5cHRpb25LZXkiOiJiZ1UzMkZNd0U3Zm5rZ0Jqa3VlcmtVdFpqTVZYcjQySjZObjN1RGp0SzNZIiwiYnJhbmNoIjoidDItZGlzY291cnNlLWdyYXBoaXRlLTUiLCJyZXBvT3duZXIiOiJkcmFwZS1pbyIsInJlcG9OYW1lIjoiY3JiZW5jaC1jdXJzb3ItMjAyNi0wOSIsInByb3ZpZGVyIjoiZ2l0aHViIn19" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmM1NzRiMDdjLThhMWYtNDRmMy04ZDVhLWI2Y2VlZGFhNjA3ZSIsImVuY3J5cHRpb25LZXkiOiJiZ1UzMkZNd0U3Zm5rZ0Jqa3VlcmtVdFpqTVZYcjQySjZObjN1RGp0SzNZIiwiYnJhbmNoIjoidDItZGlzY291cnNlLWdyYXBoaXRlLTUiLCJyZXBvT3duZXIiOiJkcmFwZS1pbyIsInJlcG9OYW1lIjoiY3JiZW5jaC1jdXJzb3ItMjAyNi0wOSIsInByTnVtYmVyIjozNSwiY29tbWl0U2hhIjoiYWQ3MTVmNTEzZWRjYmY0NDIxMTM1Nzc3YzcwNTc4Y2JmMTBjMzNkNSIsInByb3ZpZGVyIjoiZ2l0aHViIn19" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-web-light.png"><img alt="Fix in Web" width="99" height="28" src="https://cursor.com/assets/images/fix-in-web-dark.png"></picture></a></div> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ad715f513edcbf4421135777c70578cbf10c33d5. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
PR-level
<!-- BUGBOT_REVIEW --> Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues. <!-- BUGBOT_FIX_ALL --> <a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9BTExfSU5fQ1VSU09SIiwiZGF0YSI6eyJyZWRpc0tleSI6ImJ1Z2JvdC1tdWx0aTo4YTFmMjc0ZC1iMjZmLTQ0OGYtOTkyZC0xMmQxYzQ0OWEyOGIiLCJlbmNyeXB0aW9uS2V5IjoiV3B0b2haalIydmtMTGswY0NYRVYtanNJRlVnaDdFWlpwWU5aVkZXblVaOCIsImJyYW5jaCI6InQyLWRpc2NvdXJzZS1ncmFwaGl0ZS01IiwicmVwb093bmVyIjoiZHJhcGUtaW8iLCJyZXBvTmFtZSI6ImNyYmVuY2gtY3Vyc29yLTIwMjYtMDkiLCJwcm92aWRlciI6ImdpdGh1YiJ9fQ" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix All in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a> <!-- /BUGBOT_FIX_ALL --> <!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_BEGIN --> <sup>❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot).</sup> <!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_END --> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ad715f513edcbf4421135777c70578cbf10c33d5. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
Drape (Deep Review) · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 low ✓ off by one
valid · matches d1 · impact low
valid · impact low
The mobile `-40px` margin on `.custom-message` was there to undo the old `4em` left padding, which sat next to the floated icon. The diff turns `.small-action` into a flex row and cuts the padding to `0 1.5%`, so the description now starts right after the icon and the negative margin pulls the message over it. The diff changed one side of a coupled pair and left the mobile rule untouched. [grounded: tree app/assets/stylesheets/mobile/topic-post.scss] [consensus 3/3: valid=3]
valid · impact low
The new `align-items` mixin emits `-webkit-box-align` but not `-moz-box-align`, even though `flexbox()` and `inline-flex()` emit `-moz-box`. That leaves old Firefox's box layout without alignment. `-ms-align-items` is also not a real property. This is a real but low-impact gap that only affects legacy browsers. [grounded: diff] [consensus 3/3: valid=3]
raw comments (3)
app/assets/stylesheets/common/base/topic-post.scss:264
**Small-action edit/delete buttons no longer right-aligned** Now that `.small-action` is a flex row, `.small-action-desc` only grows as wide as its text, so the `float: right` delete/edit buttons sit right after the description instead of at the post's right edge. Give `.small-action-desc` `flex: 1` (with prefixed variants) so it fills the row. ``` app/assets/stylesheets/common/base/topic-post.scss:264 @include flexbox(); app/assets/stylesheets/common/base/topic-post.scss:265 @include align-items(center); app/assets/stylesheets/common/base/topic-post.scss:306 button { app/assets/stylesheets/common/base/topic-post.scss:307 background: transparent; app/assets/stylesheets/common/base/topic-post.scss:308 border: 0; app/assets/stylesheets/common/base/topic-post.scss:309 float: right; app/assets/stylesheets/common/base/topic-post.scss:310 } app/assets/stylesheets/desktop/topic-post.scss:730 .small-action { app/assets/stylesheets/desktop/topic-post.scss:731 width: 755px; app/assets/stylesheets/desktop/topic-post.scss:732 border-top: 1px solid dark-light-diff($primary, $secondary, 90%, -60%); ```
app/assets/stylesheets/common/base/topic-post.scss:280
**Mobile custom message now overlaps the action icon** On mobile, `.custom-message` still uses `margin-left: -40px`, which assumed the old 4em left padding. With the padding cut to 1.5% and the description starting right after the icon, the message gets pulled left over the icon. Remove or adjust the mobile `.custom-message` negative margin to match the new padding. ``` app/assets/stylesheets/common/base/topic-post.scss:280 padding: 0 1.5%; app/assets/stylesheets/common/base/topic-post.scss:264 @include flexbox(); app/assets/stylesheets/common/base/topic-post.scss:265 @include align-items(center); app/assets/stylesheets/mobile/topic-post.scss:520 .custom-message { app/assets/stylesheets/mobile/topic-post.scss:521 margin-left: -40px; app/assets/stylesheets/mobile/topic-post.scss:522 } ```
app/assets/stylesheets/common/foundation/mixins.scss:117
**align-items mixin skips the -moz-box prefix** `flexbox()` and `inline-flex()` both emit `-moz-box`/`-moz-inline-box`, but `align-items()` never emits `-moz-box-align`, so old Firefox gets the box layout without the alignment. `-ms-align-items` also isn't a real property. Add `-moz-box-align: $alignment;` and drop `-ms-align-items`. ``` app/assets/stylesheets/common/foundation/mixins.scss:117 @mixin align-items($alignment) { app/assets/stylesheets/common/foundation/mixins.scss:118 -webkit-box-align: $alignment; app/assets/stylesheets/common/foundation/mixins.scss:119 -webkit-align-items: $alignment; app/assets/stylesheets/common/foundation/mixins.scss:120 -ms-flex-align: $alignment; app/assets/stylesheets/common/foundation/mixins.scss:102 display: -moz-box; app/assets/stylesheets/common/foundation/mixins.scss:121 -ms-align-items: $alignment; app/assets/stylesheets/common/foundation/mixins.scss:122 align-items:$alignment; app/assets/stylesheets/common/foundation/mixins.scss:123 } ```
Drape (Review) · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 low ✓ off by one
valid · impact low
`app/assets/stylesheets/mobile/topic-post.scss:520-521` still sets `.custom-message { margin-left: -40px; }`. That offset used to pull the message back into the old 4em left padding of `.small-action-desc`. This change sets that padding to 1.5% and makes `.small-action` a flex row, so on mobile the -40px now pulls the message out of the description and over the avatar column. The change is what causes this misalignment. [grounded: diff] [consensus 3/3: valid=3]
valid · matches d1 · impact low
raw comments (2)
app/assets/stylesheets/mobile/topic-post.scss:520
**Mobile custom-message offset now misaligned** Mobile `.custom-message` still uses `margin-left: -40px`, tuned for the old 4em left padding on `.small-action-desc`. The desc padding is now `0 1.5%`, so this negative margin pulls the message text outside the desc and under or left of the avatar icon. ``` app/assets/stylesheets/common/base/topic-post.scss:280 padding: 0 1.5%; ```
app/assets/stylesheets/common/base/topic-post.scss:264
**Small-action edit/delete buttons no longer right-aligned** `.small-action` is now a flex row, so `.small-action-desc` shrinks to its content instead of filling the row. The `float: right` edit/delete buttons now sit next to the text, not at the right edge. Give `.small-action-desc` `flex: 1` so it fills the row. ``` app/assets/stylesheets/common/base/topic-post.scss:264 @include flexbox(); app/assets/stylesheets/common/base/topic-post.scss:265 @include align-items(center); app/assets/stylesheets/common/base/topic-post.scss:280 padding: 0 1.5%; ```
greptile · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 low ✗ —
valid · impact low
In app/views/application/_header.html.erb, `.panel` sits inside `<div class="row">`, so the only flex item of `.contents` is `.row`. With `float: right` removed (and `.title` no longer floated), `margin-left: auto` and `order` have no effect on the panel, so the server-rendered login panel is no longer right-aligned. [grounded: diff] [consensus 3/3: valid=3]
valid · impact low
The flexbox mixin emits `display: -moz-box`, but the align-items mixin never emits `-moz-box-align`. Old Firefox versions that fall back to the -moz-box model would therefore ignore the alignment. This only affects very old browsers, so the impact is small. [grounded: diff] [consensus 3/3: valid=3]
raw comments (3)
app/assets/stylesheets/common/base/header.scss:39
<a href="#"><img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9" align="top"></a> **Panel loses right alignment** The server-rendered anonymous header nests `.panel` inside `.row`, rather than making it a flex item of `.contents`. As a result, replacing `float: right` with `margin-left: auto` and `order` does not position this panel, so the login control is no longer right-aligned while this header is displayed. Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
app/assets/stylesheets/common/foundation/mixins.scss:123
<a href="#"><img alt="P2" src="https://greptile-static-assets.s3.amazonaws.com/badges/p2.svg?v=9" align="top"></a> **Legacy Firefox alignment omitted** The flex mixin enables the old Mozilla box model with `display: -moz-box`, but this alignment mixin does not emit the matching `-moz-box-align` property. Firefox versions within the documented 16+ support range therefore ignore the requested center or baseline alignment, which can visibly misalign the converted header, small-action, and badge layouts.
PR-level
<h3>Greptile Summary</h3> This PR converts several header and topic elements to prefixed flexbox layouts and introduces shared flexbox mixins. - Reorders topic information and controls within the application header. - Centers small-action content and revises its spacing. - Applies shared inline-flex alignment to category badges. - Leaves the server-rendered header panel outside the flex layout and incompletely supports legacy Mozilla alignment. <h3>Confidence Score: 4/5</h3> The PR should not merge until the server-rendered anonymous header retains correct login-panel positioning; legacy Firefox alignment should also be corrected. The flex conversion leaves the server-rendered panel nested outside the relevant flex container, so its replacement alignment properties do not work, and the shared alignment mixin omits the property required by the legacy Mozilla flex mode it enables. **Files Needing Attention:** app/assets/stylesheets/common/base/header.scss, app/assets/stylesheets/common/foundation/mixins.scss <details><summary><h3>Important Files Changed</h3></summary> | Filename | Overview | |----------|----------| | app/assets/stylesheets/common/base/header.scss | Converts the header contents to flexbox, but the replacement panel positioning does not work for the nested server-rendered panel. | | app/assets/stylesheets/common/base/topic-post.scss | Converts small-action rows to centered flexbox and simplifies description spacing. | | app/assets/stylesheets/common/base/topic.scss | Assigns topic header information its intended flex order and adjusts line height. | | app/assets/stylesheets/common/components/badges.css.scss | Replaces direct inline-flex declarations with the new shared mixins. | | app/assets/stylesheets/common/foundation/mixins.scss | Adds prefixed flexbox helpers, but omits legacy Mozilla alignment while enabling its box model. | </details> <!-- greptile_other_comments_section --> <sub>Reviews (1): Last reviewed commit: ["Update app/assets/stylesheets/common/bas..."](https://github.com/drape-io/crbench-greptile-2026-09/commit/540179cd5772c9a38ac03d54818b618493a7bff5) | [Re-trigger Greptile](https://app.greptile.com/api/retrigger?id=64284395)</sub>
Mjolnir (Opus 5.5) · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 low ✓ off by one
valid · matches d1 · impact low
valid · impact low
mobile/topic-post.scss:520-521 still has `.custom-message { margin-left: -40px; }`. That offset was written for the old 4em left padding and float layout. The diff removes that padding and makes `.small-action` a flex row with the icon as a sibling item, so the -40px margin now pulls the message into the icon column. [grounded: diff] [consensus 3/3: valid=3]
valid · impact low
Same issue as finding 1. The mobile -40px custom-message margin (mobile/topic-post.scss:520-521) no longer matches the new 1.5% padding inside the flex layout, so the message overlaps the icon column on mobile. [grounded: diff] [consensus 3/3: valid=3]
raw comments (3)
app/assets/stylesheets/common/base/topic-post.scss:263
[P2] Small-action description no longer fills the row, so the edit/delete buttons move next to the text `.small-action` is now a flex container, which makes `.small-action-desc` a flex item with the default `flex: 0 1 auto`. That item is now only as wide as its content instead of filling the row as a block. The edit/delete `button`s are `float: right` inside `.small-action-desc`, so they used to sit at the post's right edge. For short descriptions like "closed 2 days ago" they now sit right after the text. Any later rules that assume the description is full width are affected the same way. Giving `.small-action-desc` `flex: 1` (or the matching prefixed rules) would restore the old layout.
app/assets/stylesheets/common/base/topic-post.scss:280
[P3] Mobile custom message now overlaps the action icon The base `.small-action-desc` padding changed from `0.5em 0 0.5em 4em` to `0 1.5%`, and its parent is now a flex container. Mobile still has `.small-action .small-action-desc .custom-message { margin-left: -40px; }` (mobile/topic-post.scss), which assumed the old ~4em left padding and float wrapping. The description now starts right after the 45px icon column, with no float to wrap around, and has only ~1.5% padding. The -40px margin therefore pulls the custom message into the icon's area, and `align-items: center` centers the icon vertically, so on mobile, actions with a custom message (e.g. closing a topic with a reason) render the message on top of the icon.
app/assets/stylesheets/common/base/topic-post.scss:279
[P3] Mobile custom-message offset no longer matches the new small-action padding This change drops the `.small-action-desc` left padding from `4em` to `1.5%` and puts it next to the icon with flexbox. But `app/assets/stylesheets/mobile/topic-post.scss` (lines 516-523) still sets `.custom-message { margin-left: -40px; }`. That offset only made sense when the description had about 4em of left padding to pull back into. Now the 40px pull moves the custom message out of the description box and into the 45px `.topic-avatar` icon column. On mobile, small actions with a custom message (`post.cooked`, e.g. close/autoclose notes) will have text overlapping the vertically centered icon. The mobile override should be removed or adjusted along with this padding change.
Mjolnir (Sonnet 5.5) · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 low ✗ —
valid · impact low
The mobile override `.small-action .small-action-desc .custom-message { margin-left: -40px; }` is still in place. The diff removes the 4em left padding and makes `.small-action` a flex row, so `.small-action-desc` now sits directly beside the icon and the -40px margin pulls the message into the icon column. [grounded: tree app/assets/stylesheets/mobile/topic-post.scss] [consensus 3/3: valid=3]
valid · impact low
This is the same issue as finding 0. The unchanged mobile -40px margin on `.custom-message` used to be offset by the 4em padding; with the new `0 1.5%` padding and the flex layout, it pulls the message over the small-action icon. [grounded: tree app/assets/stylesheets/mobile/topic-post.scss] [consensus 3/3: valid=3]
raw comments (2)
app/assets/stylesheets/common/base/topic-post.scss:280
[P2] Mobile custom-message offset now overlaps the icon `.small-action-desc` padding changed from `0.5em 0 0.5em 4em` to `0 1.5%`, but `app/assets/stylesheets/mobile/topic-post.scss:516-523` still applies `.custom-message { margin-left: -40px }`. That negative margin was sized against the old ~4em left padding. With only ~1.5% left padding, mobile small-action posts that have a custom message (`post.cooked`) will pull the message about 35px left of the description box. It will then overlap the 45px-wide `.topic-avatar` icon in the flex row. The mobile override needs to be removed or adjusted to match the new layout.
app/assets/stylesheets/common/base/topic-post.scss:280
[P2] Mobile custom-message negative margin now overlaps the small-action icon This change replaces the `.small-action-desc` padding of `0.5em 0 0.5em 4em` with `0 1.5%`, and `.small-action` is now a flex row with the icon beside the description. `app/assets/stylesheets/mobile/topic-post.scss:516-523` is unchanged and still sets `.small-action .small-action-desc .custom-message { margin-left: -40px; }`. That offset was written to pull the message back into the 4em left padding, and that padding is now about 5px. On mobile, any small action that has a custom message (`post.cooked`, for example a close or archive message) will have its text pulled about 35px left, into the icon column. I didn't render it, so the amount of overlap is an estimate from the CSS. The mobile override needs to be removed or adjusted along with the padding change.
qodo · cross-file engine perris 0.11.1+proven.tiered0.25.call.read.subclass.type
DefectSeverityFoundGrade
d1 low ✓ off by one
valid · matches d1 · impact low
raw comments (3)
app/assets/stylesheets/common/base/topic-post.scss:265
<img src="https://img.shields.io/badge/Medium-634FD1?style=flat-square" height="20px" alt="Remediation recommended"> 1\. Small-action controls stop reaching the row edge <code>🐞 Bug</code> <code>≡ Correctness</code> <pre> <b><i>.small-action</i></b> becomes a flex container, but <b><i>.small-action-desc</i></b> has no flex growth or equivalent width rule. When the description is short, the flex item remains only as wide as its contents, so the nested edit and delete buttons float to that narrow item’s edge instead of the full post row. </pre> <details> <summary><strong>Agent Prompt</strong></summary> ``` ## Issue description `.small-action` is now a flex container, but `.small-action-desc` does not grow to fill the remaining row width. Its nested buttons use `float: right`, so short descriptions cause the controls to stop near the text instead of aligning with the row’s right edge. ## Fix Focus Areas - app/assets/stylesheets/common/base/topic-post.scss[264-265] - app/assets/stylesheets/common/base/topic-post.scss[279-310] - app/assets/javascripts/discourse/templates/components/small-action.hbs[1-14] ## Recommended Fix Make `.small-action-desc` occupy the remaining width of `.small-action`, using the project’s supported flexbox mixins or an equivalent prefixed flex-grow rule. Preserve the existing nested button alignment after the description expands across the row, and add or update a style regression test if this area has coverage. ``` <code>ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools</code> </details>
PR-level
<h3>PR Summary by Qodo</h3> Modernize header and topic layouts with reusable flexbox mixins <code>🐞 Bug fix</code> <code>✨ Enhancement</code> <code>🕐 20-40 Minutes</code> <img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider"> <details> <summary>AI Description</summary> <dl> <dd> <br/> ><pre> >• Adds reusable vendor-prefixed flexbox, alignment, and ordering mixins. >• Reorders and vertically aligns header content without relying on container floats. >• Aligns topic actions and category badges while simplifying spacing. ></pre> </dd> </dl> </details> <details> <summary>Diagram</summary> <dl> <dd> <br/> ```mermaid graph TD M["Flexbox mixins"] --> H["Header styles"] --> U["Header layout"] M --> T["Topic header"] --> U M --> P["Action styles"] --> V["Topic layout"] M --> B["Badge styles"] --> V ``` </dd> </dl> </details> <details> <summary>High-Level Assessment</summary> <dl> <dd> <br/> >The following are alternative approaches to this PR: <details> <summary><b>1. Use CSS post-processing</b></summary> <dl> <dd> - ➕ Automatically generates required vendor prefixes. - ➕ Reduces custom mixin maintenance as flexbox specifications evolve. - ➖ Requires introducing or changing the stylesheet build pipeline. - ➖ Creates broader migration scope than this targeted layout correction. - ➖ May complicate support for the repository&#x27;s older browser targets. </dd> </dl> </details> >**Recommendation:** The shared mixin approach is appropriate for this scoped patch and matches the existing Sass foundation structure while avoiding repeated prefixes. Automated prefixing would be preferable as a broader build-system modernization, but it should not block this focused layout change. </dd> </dl> </details> <details> <summary> Files changed (5) <code> +54 / -13 </code> </summary> <dl> <dd> <br/> <details> <summary>Enhancement (1) <code> +37 / -0 </code></summary> <dl> <dd> <details> <summary>mixins.scss<code>Add reusable cross-browser flexbox mixins</code> <code>+37/-0</code></summary> <br/> >Add reusable cross-browser flexbox mixins > ><pre> >• Introduces mixins for flex, inline-flex, cross-axis alignment, and item ordering. Each helper emits standard declarations alongside legacy WebKit, Mozilla, and Microsoft variants. ></pre> > ><a href='https://github.com/drape-io/crbench-qodo-2026-09/pull/34/files#diff-bce8deaa7615284340432bb1cb2753101249cf744964145e81bede64b232fc52'>app/assets/stylesheets/common/foundation/mixins.scss</a> </details> </dd> </dl> </details> <details> <summary>Bug fix (3) <code> +13 / -11 </code></summary> <dl> <dd> <details> <summary>header.scss<code>Replace floated header positioning with flexbox ordering</code> <code>+5/-4</code></summary> <br/> >Replace floated header positioning with flexbox ordering > ><pre> >• Makes the header contents a vertically centered flex container. The control panel now uses automatic left margin and explicit ordering instead of floating, allowing topic information to occupy the middle position. ></pre> > ><a href='https://github.com/drape-io/crbench-qodo-2026-09/pull/34/files#diff-929b9aca64d4254a0192f0313726a597e817617f33063a4ca6d45491cd023f31'>app/assets/stylesheets/common/base/header.scss</a> </details> <details> <summary>topic-post.scss<code>Align small topic actions with flexbox</code> <code>+5/-4</code></summary> <br/> >Align small topic actions with flexbox > ><pre> >• Converts small-action rows to vertically centered flex layouts. Simplifies description and paragraph spacing to remove offsets previously needed by the floated layout. ></pre> > ><a href='https://github.com/drape-io/crbench-qodo-2026-09/pull/34/files#diff-6da83680c0c7a3be72a1d9003c857fcae8c83d8312f3fbcbb452e4f85d68dc21'>app/assets/stylesheets/common/base/topic-post.scss</a> </details> <details> <summary>topic.scss<code>Position topic metadata within the flex header</code> <code>+3/-3</code></summary> <br/> >Position topic metadata within the flex header > ><pre> >• Assigns the extra topic information the second flex position and normalizes its line height. Removes the bullet badge&#x27;s header-specific top-margin adjustment. ></pre> > ><a href='https://github.com/drape-io/crbench-qodo-2026-09/pull/34/files#diff-22f83714205833ae94503688bf93285bbd6983883a3b0a1b13d25091d2942e5b'>app/assets/stylesheets/common/base/topic.scss</a> </details> </dd> </dl> </details> <details> <summary>Refactor (1) <code> +4 / -2 </code></summary> <dl> <dd> <details> <summary>badges.css.scss<code>Apply prefixed inline-flex utilities to bullet badges</code> <code>+4/-2</code></summary> <br/> >Apply prefixed inline-flex utilities to bullet badges > ><pre> >• Replaces direct inline-flex and alignment declarations with shared mixins, extending category badge alignment across prefixed browser implementations. ></pre> > ><a href='https://github.com/drape-io/crbench-qodo-2026-09/pull/34/files#diff-55c6e3740a09baad402dc196c9b5ba4df6849d8fc62fad0e428ed9a61f7e31a8'>app/assets/stylesheets/common/components/badges.css.scss</a> </details> </dd> </dl> </details> </dd> </dl> </details>
PR-level
<h3>Code Review by Qodo</h3> <code>🐞 Bugs (1)</code> <code>📘 Rule violations (0)</code> <code>📜 Skill insights (0)</code> <img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider"> <br/> <img src="https://img.shields.io/badge/Medium-634FD1?style=flat-square" height="20px" alt="Remediation recommended"> <details> <summary> 1. Small-action controls stop reaching the row edge <code>🐞 Bug</code> <code>≡ Correctness</code></summary> <br/> > <details open> ><summary>Description</summary> ><br/> > ><pre> ><b><i>.small-action</i></b> becomes a flex container, but <b><i>.small-action-desc</i></b> has no flex growth or equivalent >width rule. When the description is short, the flex item remains only as wide as its contents, so >the nested edit and delete buttons float to that narrow item’s edge instead of the full post row. ></pre> ></details> > <details> ><summary>Code</summary> ><br/> > ><code>[app/assets/stylesheets/common/base/topic-post.scss[R264-265]](https://github.com/drape-io/crbench-qodo-2026-09/pull/34/files#diff-6da83680c0c7a3be72a1d9003c857fcae8c83d8312f3fbcbb452e4f85d68dc21R264-R265)</code> > >```diff >+ @include flexbox(); >+ @include align-items(center); >``` ></details> > <details> ><summary>Evidence</summary> ><br/> > ><pre> >The new <b><i>.small-action</i></b> flex container contains a topic avatar and <b><i>.small-action-desc</i></b>; the >description rule only sets padding and typography, so it remains an intrinsic-width flex item. The >template places the edit/delete buttons inside that description element, and the buttons retain ><b><i>float: right</i></b>, making their containing block the narrow description item rather than the full row. ></pre> > > <code>[app/assets/stylesheets/common/base/topic-post.scss[263-310]](https://github.com/drape-io/crbench-qodo-2026-09/blob/7e6ab8b283c7ab74b44dd308c2ec2b9ce23f91fc/app/assets/stylesheets/common/base/topic-post.scss/#L263-L310)</code> > <code>[app/assets/javascripts/discourse/templates/components/small-action.hbs[1-14]](https://github.com/drape-io/crbench-qodo-2026-09/blob/7e6ab8b283c7ab74b44dd308c2ec2b9ce23f91fc/app/assets/javascripts/discourse/templates/components/small-action.hbs/#L1-L14)</code> ></details> > <details> ><summary>Agent prompt</summary> ><br/> > >``` >The issue below was found during a code review. Follow the provided context and guidance below and implement a solution > >## Issue description >`.small-action` is now a flex container, but `.small-action-desc` does not grow to fill the remaining row width. Its nested buttons use `float: right`, so short descriptions cause the controls to stop near the text instead of aligning with the row’s right edge. > >## Fix Focus Areas >- app/assets/stylesheets/common/base/topic-post.scss[264-265] >- app/assets/stylesheets/common/base/topic-post.scss[279-310] >- app/assets/javascripts/discourse/templates/components/small-action.hbs[1-14] > >## Recommended Fix >Make `.small-action-desc` occupy the remaining width of `.small-action`, using the project’s supported flexbox mixins or an equivalent prefixed flex-grow rule. Preserve the existing nested button alignment after the description expands across the row, and add or update a style regression test if this area has coverage. >``` > <code>ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools</code> ></details> <hr/> </details> <img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider"> <!-- qodo-context:start --> <details><summary><strong>Context sources</strong></summary> <div>Review mode: <code>🚀 Fast</code>: This is a localized, low-risk CSS layout change centered on flexbox compatibility mixins, with no security, data, API, or cross-cutting runtime impact.</div> <!-- qodo-context:end --> </details> <img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider"> <!-- qodo-daily-tip:start --> <details> <summary><strong>Tip of the day</strong></summary> <br/> <pre>💡 Did you know, you can reply &#x27;qodo&#x27; on any finding to push back, ask questions, or dig deeper</pre> <a href="https://docs.qodo.ai/tips-and-tricks">More tips ↗</a> | <a href="https://app.qodo.ai/configurations?tab=display-preferences">Customize Qodo ↗</a> | <a href="https://docs.qodo.ai">Qodo docs ↗</a> </details> <img src="https://www.qodo.ai/wp-content/uploads/2025/11/light-grey-line.svg" height="10%" alt="Grey Divider"> <!-- qodo-daily-tip:end --> <!-- https://github.com/drape-io/crbench-qodo-2026-09/commit/7e6ab8b283c7ab74b44dd308c2ec2b9ce23f91fc --> <a href="https://www.qodo.ai"><img src="https://www.qodo.ai/wp-content/uploads/2025/03/qodo-logo.svg" width="80" alt="Qodo Logo"></a>