Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix([shared-pill-chip-component]): address claude+codex review

Adam Eivya9b22a5ad02f
diff --git a/client/src/components/ui/Pill.jsx b/client/src/components/ui/Pill.jsx
index b443db753d..f54635a6d7 100644
--- a/client/src/components/ui/Pill.jsx
+++ b/client/src/components/ui/Pill.jsx
@@ -6,7 +6,9 @@
// Knobs map to real call-site shapes — nothing speculative:
// tone — semantic color trio (text + bg-tint + border). `context` is the
// uppercase no-bg variant; `note` is muted + italic; `bare` emits no
-// color so a data-driven badge can supply its own via `className`.
+// color, so a data-driven badge must supply ALL colors via `className`
+// (including a `border-<color>` when it keeps the default border, else
+// the bare `border` width paints Tailwind's default color).
// size — `sm` (text-xs / px-2, default) or `xs` (text-[10px] / px-1.5).
// icon — optional leading lucide glyph (renders inline-flex + gap).
// bordered — default true (the WritersRoom bordered look); pass false for the
diff --git a/client/src/components/ui/Pill.test.jsx b/client/src/components/ui/Pill.test.jsx
index 73208bc5a2..1bd48f1606 100644
--- a/client/src/components/ui/Pill.test.jsx
+++ b/client/src/components/ui/Pill.test.jsx
@@ -12,7 +12,8 @@ describe('Pill', () => {
expect(el.className).toContain('bg-port-bg');
expect(el.className).toContain('text-xs');
expect(el.className).toContain('px-2');
- expect(el.className).toContain('border');
+ // Token membership, not substring — `border-port-border` also contains "border".
+ expect(el.className.split(/\s+/)).toContain('border');
expect(el.className).toContain('border-port-border');
});
@@ -63,6 +64,13 @@ describe('Pill', () => {
expect(el.className).not.toContain('text-gray-300');
});
+ it('tone="bare" keeps the default border width so a className border-color paints it', () => {
+ render(<Pill tone="bare" className="border-port-warning/30">x</Pill>);
+ const el = screen.getByText('x');
+ expect(el.className.split(/\s+/)).toContain('border');
+ expect(el.className).toContain('border-port-warning/30');
+ });
+
it('passes through arbitrary props like title', () => {
render(<Pill title="tooltip">x</Pill>);
expect(screen.getByText('x')).toHaveAttribute('title', 'tooltip');
diff --git a/client/src/pages/WritersRoomGuide.jsx b/client/src/pages/WritersRoomGuide.jsx
index 7a3daae7ae..ad85d2fa39 100644
--- a/client/src/pages/WritersRoomGuide.jsx
+++ b/client/src/pages/WritersRoomGuide.jsx
@@ -167,9 +167,9 @@ export default function WritersRoomGuide() {
<div key={item.id} className="bg-port-card border border-port-border rounded-lg p-4">
<div className="flex items-center justify-between gap-2 mb-1">
<h3 className="text-sm font-semibold text-white">{item.title}</h3>
- <span className="text-[10px] uppercase tracking-wide text-port-warning border border-port-warning/30 bg-port-warning/10 rounded px-1.5 py-0.5">
+ <Pill tone="bare" size="xs" className="uppercase tracking-wide text-port-warning border-port-warning/30 bg-port-warning/10">
{item.status}
- </span>
+ </Pill>
</div>
<p className="text-xs text-gray-400 leading-relaxed">{item.summary}</p>
</div>