Commit 8a6f1b1
committed
fix(chat): the context and review bars sat flush left, not in the column
Reported from the editor tab: the context-window card and the Keep all / Undo all bar
hug the left window edge while the transcript and composer are centred.
The shell-column rule centres seven bars:
#bgTasksBar, #ctxBar, #planBar, #reviewBar, #workbar, #composer, #status {
width: calc(100% - 2 * var(--shell-x));
max-width: var(--prose-max);
margin-inline: auto; <- this
}
Every selector in it is a BARE ID, so a later bare-id rule ties on specificity and wins
on order. Three of the seven then declare a `margin:` SHORTHAND hundreds of lines down —
`margin: 0 8px 6px` on #ctxBar and #bgTasksBar, `margin: 0 8px 8px` on #reviewBar — and a
shorthand writes every longhand it covers, so margin-inline: auto silently became 8px.
The bars kept the right WIDTH (the width calc is unopposed) and lost their position,
which is exactly what the report shows: correct size, wrong place.
Those insets were left over from the sidebar era and are redundant now — the width calc
already insets by --shell-x. Changed to margin-block, which cannot touch the inline axis.
#bgTasksBar had the same bug and was not in the report; it only shows while a background
command is running.
#composer also declares a shorthand, `margin: 8px auto` — its inline slot IS auto, so it
re-states the centring rather than breaking it. Left alone. Writing the guard I first
banned every `margin:` shorthand and it flagged the composer, which would have been a
false positive; the rule is "inline slot must be auto", not "no shorthand".
The guard walks the shell rule's OWN selector list rather than three hard-coded ids, so a
bar added to the column later is covered the day it is added. It parses the shorthand's
slots ([all] / [block inline] / [top inline bottom] / [top right bottom left]) and fails
only when the inline slot is not auto.
Bypass-verified, each by reverting the fix:
- the reported bug verbatim (3-slot shorthand on #ctxBar)
- the same on #reviewBar and #bgTasksBar
- a 4-slot shorthand with asymmetric right/left
- margin-left and margin-inline set directly
- the shell column dropping margin-inline entirely
- control: `margin: 6px auto` still passes, so the guard is not blanket
Verified by rendering the real bars at 1100px against develop and against the fix.
34 suites green.1 parent 64c7073 commit 8a6f1b1
2 files changed
Lines changed: 49 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
| |||
628 | 634 | | |
629 | 635 | | |
630 | 636 | | |
631 | | - | |
| 637 | + | |
632 | 638 | | |
633 | 639 | | |
634 | 640 | | |
| |||
665 | 671 | | |
666 | 672 | | |
667 | 673 | | |
668 | | - | |
| 674 | + | |
669 | 675 | | |
670 | 676 | | |
671 | 677 | | |
| |||
679 | 685 | | |
680 | 686 | | |
681 | 687 | | |
682 | | - | |
| 688 | + | |
683 | 689 | | |
684 | 690 | | |
685 | 691 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
732 | 772 | | |
0 commit comments