@devries-cameron20 / t3code Mirror · read-only / commits / aa16c180e5
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 24, 17:45 UTC

fix(web): align composer inline chips with prompt text (#5495)

Wout Stiens committed Aug 6, 2026 at 18:57 UTC aa16c180e5850ab94c022d3e41e18350c2117deb
2 files changed +9 -5
apps/web/src/components/ComposerPromptEditor.tsx
+5 -5
@@ -72,8 +72,8 @@ import { cn, isMacPlatform } from "~/lib/utils";
72 import { basenameOfPath } from "~/pierre-icons";
73 import {
74 COMPOSER_INLINE_CHIP_ICON_CLASS_NAME,
75 - COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME,
75 COMPOSER_INLINE_SKILL_CHIP_CLASS_NAME,
76 + COMPOSER_INLINE_SKILL_CHIP_LABEL_CLASS_NAME,
77 SKILL_CHIP_ICON_SVG,
78 } from "./composerInlineChip";
79 import { FILE_TAG_CHIP_CLASS_NAME, FileTagChipContent } from "./chat/FileTagChip";
@@ -188,7 +188,7 @@ class ComposerMentionNode extends DecoratorNode<React.ReactElement> {
188
189 override createDOM(): HTMLElement {
190 const dom = document.createElement("span");
191 - dom.className = "composer-inline-chip relative inline-flex align-middle leading-none";
191 + dom.className = "composer-inline-chip relative inline-flex align-[-0.125em] leading-none";
192 return dom;
193 }
194
@@ -256,7 +256,7 @@ function ComposerSkillDecorator(props: { skillLabel: string; skillDescription: s
256 className={COMPOSER_INLINE_CHIP_ICON_CLASS_NAME}
257 dangerouslySetInnerHTML={{ __html: SKILL_CHIP_ICON_SVG }}
258 />
259 - <span className={COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME}>{props.skillLabel}</span>
259 + <span className={COMPOSER_INLINE_SKILL_CHIP_LABEL_CLASS_NAME}>{props.skillLabel}</span>
260 </span>
261 );
262
@@ -326,7 +326,7 @@ class ComposerSkillNode extends DecoratorNode<React.ReactElement> {
326
327 override createDOM(): HTMLElement {
328 const dom = document.createElement("span");
329 - dom.className = "composer-inline-chip relative inline-flex align-middle leading-none";
329 + dom.className = "composer-inline-chip relative inline-flex align-[-0.125em] leading-none";
330 return dom;
331 }
332
@@ -397,7 +397,7 @@ class ComposerTerminalContextNode extends DecoratorNode<React.ReactElement> {
397
398 override createDOM(): HTMLElement {
399 const dom = document.createElement("span");
400 - dom.className = "composer-inline-chip relative inline-flex align-middle leading-none";
400 + dom.className = "composer-inline-chip relative inline-flex align-[-0.125em] leading-none";
401 return dom;
402 }
403
apps/web/src/components/composerInlineChip.ts
+4
@@ -14,6 +14,10 @@ export const CHAT_INLINE_CHIP_LABEL_CLASS_NAME = "truncate leading-tight";
14
15 export const COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME = `${CHAT_INLINE_CHIP_LABEL_CLASS_NAME} select-none`;
16
17 +// The skill label is smaller than the surrounding prompt text; offset its
18 +// glyphs without moving the pill box or changing the editor's line height.
19 +export const COMPOSER_INLINE_SKILL_CHIP_LABEL_CLASS_NAME = `${COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME} relative top-[0.15em]`;
20 +
21 export const COMPOSER_INLINE_SKILL_CHIP_CLASS_NAME =
22 "inline-flex max-w-full select-none items-center gap-[0.33em] rounded-[0.5em] border border-fuchsia-500/25 bg-fuchsia-500/12 px-[0.5em] py-[0.08em] font-medium text-[0.86em] leading-[1.1] text-fuchsia-700 align-middle dark:text-fuchsia-300";
23