Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions changelogs/v2.6.11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## What's new

### Changed

- **Tags are now tidier everywhere.** The notes filter no longer dumps every tag into an endless wrap — tags are sorted by how often they're used, capped to a compact row, and the rest collapse behind a `+N` pill (with a "Show all" toggle). In the notes list, tags moved to their own line *below* the date at a smaller size, so rows no longer jumble; beyond three tags they collapse into a hoverable `+N` pill. The same `+N` treatment now applies to project headers, pinned notes, kanban cards, the note editor's tag bar (smaller badges + expandable overflow), and mobile note/calendar rows — and card-detail tag toggles sort most-used first.
- **Overflow is now consistent everywhere, not just for tags.** The `+N` pill is a shared component used across tags, automation-run artifacts, task-flow previews, model usage, and recent agent sessions — so capped lists always show a tooltip with the hidden items instead of silently dropping them.
- **Label typography is now on two canonical scales.** A shared `MicroLabel` (small field captions) and `SectionLabel` (section headers) component replace the ~6 ad-hoc micro font sizes that previously floated around settings, agent, calendar and onboarding surfaces.

### Fixed

- Tag rows no longer silently drop tags past an arbitrary cap — every capped surface shows a `+N` pill with the hidden tag names in a tooltip.
- Several stray theme-token violations: a hardcoded `green-400` on the chat copy state, hardcoded hex fallbacks in the matrix legend, and `rgba()` backgrounds in the priority-board dashboard template now use theme tokens (`--success`, `--accent`, `color-mix`) so they follow light/dark mode.
- The AI-setup onboarding step referenced an undefined `--purple-500` CSS token for the Local Engine card's selected state, producing an invisible highlight — it now uses the standard accent token like the sibling provider card.
- Remaining pixel-based font sizes (`text-[10px]`, `text-[10.5px]`, `text-[12.5px]`) were converted to the rem-based scale.
21 changes: 19 additions & 2 deletions mobile/src/components/TagChips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ import type { TagRow } from "@/db/queries";
/**
* Tag pills matching the desktop tag chips — a coloured dot + name on a tinted
* background derived from the tag colour. Renders nothing when there are no tags.
* Pass `max` to cap the row; any tags beyond the cap collapse into a "+N" chip.
*/
export function TagChips({ tags, size = "md" }: { tags: TagRow[]; size?: "sm" | "md" }) {
export function TagChips({ tags, size = "md", max }: { tags: TagRow[]; size?: "sm" | "md"; max?: number }) {
const t = useTheme();
if (!tags.length) return null;
const small = size === "sm";
const capped = typeof max === "number" && tags.length > max;
const shown = capped ? tags.slice(0, max) : tags;
const overflow = capped ? tags.length - max : 0;
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
return (
<View style={styles.row}>
{tags.map((tag) => (
{shown.map((tag) => (
<View
key={tag.id}
style={[
Expand All @@ -27,6 +31,18 @@ export function TagChips({ tags, size = "md" }: { tags: TagRow[]; size?: "sm" |
</Text>
</View>
))}
{overflow > 0 && (
<View
style={[
styles.chip,
small && styles.chipSm,
styles.overflowChip,
{ borderColor: withAlpha(t.border, 1) },
]}
>
<Text style={[styles.text, small && styles.textSm, { color: t.textTertiary }]}>+{overflow}</Text>
</View>
)}
</View>
);
}
Expand All @@ -42,4 +58,5 @@ const styles = StyleSheet.create({
dotSm: { width: 6, height: 6, borderRadius: 3 },
text: { ...typeScale.label },
textSm: { fontSize: 11 },
overflowChip: { backgroundColor: "transparent" },
});
10 changes: 8 additions & 2 deletions mobile/src/components/calendar/DayDetailRow.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { useMemo } from "react";
import { View, Text } from "react-native";
import { PressableScale } from "@/components/PressableScale";
import { withAlpha, PRIORITY_COLOR, type Theme } from "@/theme";
Expand All @@ -25,7 +24,9 @@ export function DayDetailRow({
t: Theme;
styles: CalendarStyles;
}) {
const shownTags = useMemo(() => (tags ?? []).slice(0, 3), [tags]);
const allTags = tags ?? [];
const shownTags = allTags.slice(0, 3);
const overflow = Math.max(0, allTags.length - shownTags.length);
const status = getDueDateStatus(card.due_date);
const priorityColor = PRIORITY_COLOR[card.priority] ?? t.textTertiary;
return (
Expand Down Expand Up @@ -58,6 +59,11 @@ export function DayDetailRow({
</Text>
</View>
))}
{overflow > 0 && (
<View style={[styles.tagChip, { backgroundColor: "transparent", borderColor: t.border }]}>
<Text style={[styles.tagText, { color: t.textTertiary }]}>+{overflow}</Text>
</View>
)}
</View>
</View>
</PressableScale>
Expand Down
3 changes: 1 addition & 2 deletions mobile/src/screens/project/NoteRowItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export const NoteRowItem = memo(function NoteRowItem({
const text = stripMarkdown(note.content ?? "").trim();
return text ? text.slice(0, 80) : "Empty note";
}, [note.content]);
const shownTags = useMemo(() => (tags ?? []).slice(0, 3), [tags]);
const onPress = useCallback(() => onOpen(note.id), [onOpen, note.id]);
const handleLongPress = useCallback(() => onLongPress(note), [onLongPress, note]);
return (
Expand Down Expand Up @@ -65,7 +64,7 @@ export const NoteRowItem = memo(function NoteRowItem({
</Text>
<View style={{ flexDirection: "row", alignItems: "center", gap: 8, paddingLeft: 21 }}>
<Text style={{ color: t.textTertiary, ...typeScale.micro, fontWeight: "400" }}>{formatRelative(note.updated_at)}</Text>
{shownTags.length > 0 && <TagChips tags={shownTags} size="sm" />}
{(tags?.length ?? 0) > 0 && <TagChips tags={tags ?? []} size="sm" max={3} />}
</View>
</PressableScale>
);
Expand Down
8 changes: 8 additions & 0 deletions src/components/agent/AgentEmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useShallow } from "zustand/react/shallow";
import { Plus, Bot, History, ArrowRight } from "lucide-react";
import { useCairnStore } from "@/store";
import { cn, formatDateCompact } from "@/lib/utils";
import { OverflowPill } from "@/components/ui/overflow-pill";
import { useAgentSessionActions } from "./useAgentSessionActions";

export function AgentEmptyState() {
Expand Down Expand Up @@ -62,6 +63,13 @@ export function AgentEmptyState() {
<ArrowRight size={10} className="text-[var(--text-tertiary)] shrink-0 opacity-0 group-hover:opacity-100" />
</button>
))}
{piSessionHistory.length > recentSessions.length && (
<OverflowPill
count={piSessionHistory.length - recentSessions.length}
names={piSessionHistory.slice(recentSessions.length).map((s) => s.taskTitle)}
className="self-center mt-1"
/>
)}
</div>
)}
</div>
Expand Down
9 changes: 5 additions & 4 deletions src/components/agent/ArchitectureSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
Layers,
} from "lucide-react";
import { CairnEvents } from "@/lib/events";
import { MicroLabel, SectionLabel } from "@/components/ui/labels";

interface CodebaseSymbol {
id: string; file_id: string; name: string; kind: string; line: number;
Expand Down Expand Up @@ -135,9 +136,9 @@ export function ArchitectureSidebar() {
{/* Header */}
<div className="flex items-center gap-2 px-3 h-9 border-b border-[var(--border)] flex-shrink-0">
<Boxes size={13} className="text-[var(--accent)]" />
<span className="text-[0.7rem] uppercase tracking-wide text-[var(--text-tertiary)] flex-1 truncate">
<SectionLabel className="flex-1 truncate">
Architecture
</span>
</SectionLabel>
<button
onClick={() => setCollapsed(true)}
className="text-[var(--text-tertiary)] hover:text-[var(--text-primary)] transition-colors"
Expand Down Expand Up @@ -238,9 +239,9 @@ function RelBlock({
}
return (
<div className="flex flex-col gap-0.5">
<div className="flex items-center gap-1 text-[0.65rem] uppercase tracking-wide text-[var(--text-tertiary)]">
<MicroLabel className="flex items-center gap-1">
{icon} {label} ({names.length})
</div>
</MicroLabel>
{names.map((n) => (
<div key={n} className="text-[0.7rem] font-mono text-[var(--text-secondary)] truncate pl-3">
{n}
Expand Down
9 changes: 5 additions & 4 deletions src/components/agent/ArchitectureView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
} from "lucide-react";
import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
import { SectionLabel } from "@/components/ui/labels";
import { useCairnStore } from "@/store";
import { CairnEvents } from "@/lib/events";
import { ArchitectureGraphCanvas } from "./ArchitectureGraphCanvas";
Expand Down Expand Up @@ -474,9 +475,9 @@ export function ArchitectureView({ cwd }: ArchitectureViewProps) {
{/* Symbol-kind breakdown */}
{overview.kinds.length > 0 && (
<div className="px-4 py-3 border-b border-[var(--border)] flex-shrink-0">
<div className="text-[0.7rem] uppercase tracking-wide text-[var(--text-tertiary)] mb-2">
<SectionLabel className="mb-2 block">
Symbols by kind
</div>
</SectionLabel>
<div className="flex flex-col gap-1.5">
{overview.kinds.map((k) => (
<div key={k.kind} className="flex items-center gap-2">
Expand Down Expand Up @@ -714,11 +715,11 @@ function RelationList({

return (
<div>
<div className="flex items-center gap-1.5 text-[0.7rem] uppercase tracking-wide text-[var(--text-tertiary)] mb-1.5">
<SectionLabel className="flex items-center gap-1.5 mb-1.5">
{icon}
{title}
<span className="tabular-nums">({items.length})</span>
</div>
</SectionLabel>
{items.length === 0 ? (
<div className="text-[0.7rem] text-[var(--text-tertiary)]">{empty}</div>
) : (
Expand Down
5 changes: 3 additions & 2 deletions src/components/agent/GitView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
DialogTitle,
} from "@/components/ui/dialog";
import { Tooltip } from "@/components/ui/tooltip";
import { MicroLabel } from "@/components/ui/labels";
import {
type GitStatusData,
type GitLogData,
Expand Down Expand Up @@ -857,9 +858,9 @@ export function GitView({ cwd }: GitViewProps) {
{/* ── Recent commits ─────────────────────────────────────────────── */}
{log.length > 0 && (
<div className="border-t border-[var(--border)]">
<div className="px-4 py-2 text-[0.65rem] font-semibold uppercase tracking-widest text-[var(--text-tertiary)] bg-[var(--surface-2)] border-b border-[var(--border-subtle)]">
<MicroLabel className="block px-4 py-2 bg-[var(--surface-2)] border-b border-[var(--border-subtle)]">
Recent commits
</div>
</MicroLabel>
<div className="divide-y divide-[var(--border-subtle)]">
{log.map((entry) => (
<div key={entry.hash} className="flex items-start gap-3 px-4 py-2 hover:bg-[var(--surface-2)] transition-colors">
Expand Down
3 changes: 2 additions & 1 deletion src/components/agent/PlanApprovalCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { useState } from "react";
import { CheckCircle, MessageSquare, Play, Send } from "lucide-react";
import { MarkdownContent } from "@/components/chat/chat-panel/MarkdownContent";
import { MicroLabel } from "@/components/ui/labels";

interface PlanApprovalCardProps {
content: string;
Expand All @@ -28,7 +29,7 @@ export function PlanApprovalCard({ content, busy, onApprove, onRequestChanges }:
<div className="flex items-center gap-2 px-3 py-2 border-b border-[var(--border)]">
<CheckCircle size={13} className="text-[var(--warning,#f59e0b)]" />
<span className="text-[0.714rem] font-semibold text-[var(--text-primary)] flex-1">Plan ready for your direction</span>
<span className="text-[0.607rem] uppercase tracking-wider text-[var(--text-tertiary)]">Choose autonomy</span>
<MicroLabel>Choose autonomy</MicroLabel>
</div>
<div className="max-h-52 overflow-y-auto px-3 py-2 text-[0.714rem] leading-relaxed text-[var(--text-secondary)]">
<MarkdownContent content={content} />
Expand Down
3 changes: 2 additions & 1 deletion src/components/agent/git/FileSection.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client";

import { ChevronRight, ChevronDown } from "lucide-react";
import { MicroLabel } from "@/components/ui/labels";

/** Collapsible section header (Staged / Modified / Untracked) wrapping its file rows. */
export function FileSection({
Expand All @@ -25,7 +26,7 @@ export function FileSection({
}}
>
{expanded ? <ChevronDown size={10} /> : <ChevronRight size={10} />}
<span className="text-[0.65rem] font-semibold uppercase tracking-widest text-[var(--text-tertiary)]">{label}</span>
<MicroLabel>{label}</MicroLabel>
<span className="text-[0.65rem] text-[var(--text-tertiary)] opacity-60">{count}</span>
{action && (
<div className="ml-auto flex items-center gap-1.5" onClick={(e) => e.stopPropagation()}>
Expand Down
5 changes: 3 additions & 2 deletions src/components/calendar/UnscheduledTray.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { useMemo, useState } from "react";
import { ChevronDown, ChevronRight, Inbox } from "lucide-react";
import { DraggableChip, DroppableTray } from "./CalendarDnd";
import type { TaskCard } from "@/types";
import { MicroLabel } from "@/components/ui/labels";

interface UnscheduledTrayProps {
cards: TaskCard[];
Expand Down Expand Up @@ -76,10 +77,10 @@ export function UnscheduledTray({ cards, onOpenCard, groupByProject, projectName
<div className="flex flex-col gap-2">
{groups.map((g) => (
<div key={g.name}>
<div className="flex items-center gap-1 px-0.5 pb-1 text-[0.6rem] font-semibold uppercase tracking-wide text-[var(--text-tertiary)]">
<MicroLabel className="flex items-center gap-1 px-0.5 pb-1">
<span className="truncate">{g.name}</span>
<span className="font-normal">{g.items.length}</span>
</div>
</MicroLabel>
<div className="flex flex-wrap gap-1">{g.items.map(renderChip)}</div>
</div>
))}
Expand Down
2 changes: 1 addition & 1 deletion src/components/chat/chat-panel/ChatMessageBubble.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export const ChatMessageBubble = React.memo(function ChatMessageBubble({ message
title="Copy"
className="p-0.5 rounded text-[var(--text-tertiary)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)] transition-colors"
>
{copied ? <Check size={10} className="text-green-400" /> : <Copy size={10} />}
{copied ? <Check size={10} className="text-[var(--success)]" /> : <Copy size={10} />}
</button>
{isUser && onRetry && (
<button
Expand Down
16 changes: 8 additions & 8 deletions src/components/flow/NodeEditModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function NotePicker({ selectedId, onSelect }: { selectedId: string; onSelect: (i

return (
<div className="flex flex-col gap-2">
<label className="text-[0.786rem] font-medium text-[var(--text-tertiary)] uppercase tracking-wide">Search notes</label>
<label className="text-[0.714rem] font-medium text-[var(--text-tertiary)] uppercase tracking-wide">Search notes</label>
<div className="relative">
<Search size={12} className="absolute left-2.5 top-1/2 -translate-y-1/2 text-[var(--text-tertiary)]" />
<input
Expand All @@ -155,7 +155,7 @@ function NotePicker({ selectedId, onSelect }: { selectedId: string; onSelect: (i
</div>
<div className="flex flex-col max-h-48 overflow-y-auto rounded-lg border border-[var(--border)] divide-y divide-[var(--border)]">
{filtered.length === 0 ? (
<p className="px-3 py-3 text-[0.786rem] text-[var(--text-tertiary)] text-center">No notes found</p>
<p className="px-3 py-3 text-[0.714rem] text-[var(--text-tertiary)] text-center">No notes found</p>
) : (
filtered.map((n) => (
<button
Expand Down Expand Up @@ -204,7 +204,7 @@ function TaskPicker({ selectedId, onSelect }: { selectedId: string; onSelect: (i

return (
<div className="flex flex-col gap-2">
<label className="text-[0.786rem] font-medium text-[var(--text-tertiary)] uppercase tracking-wide">Search tasks</label>
<label className="text-[0.714rem] font-medium text-[var(--text-tertiary)] uppercase tracking-wide">Search tasks</label>
<div className="relative">
<Search size={12} className="absolute left-2.5 top-1/2 -translate-y-1/2 text-[var(--text-tertiary)]" />
<input
Expand All @@ -218,7 +218,7 @@ function TaskPicker({ selectedId, onSelect }: { selectedId: string; onSelect: (i
</div>
<div className="flex flex-col max-h-48 overflow-y-auto rounded-lg border border-[var(--border)] divide-y divide-[var(--border)]">
{filtered.length === 0 ? (
<p className="px-3 py-3 text-[0.786rem] text-[var(--text-tertiary)] text-center">No tasks found</p>
<p className="px-3 py-3 text-[0.714rem] text-[var(--text-tertiary)] text-center">No tasks found</p>
) : (
filtered.map((c) => (
<button
Expand Down Expand Up @@ -287,7 +287,7 @@ function UrlEditor({
<div className="flex flex-col gap-3">
{/* URL row with Fetch button */}
<div className="flex flex-col gap-1">
<label className="text-[0.786rem] font-medium text-[var(--text-tertiary)] uppercase tracking-wide">URL</label>
<label className="text-[0.714rem] font-medium text-[var(--text-tertiary)] uppercase tracking-wide">URL</label>
<div className="flex gap-1.5">
<input
type="text"
Expand Down Expand Up @@ -338,7 +338,7 @@ function GroupEditor({
return (
<div className="flex flex-col gap-3">
<div className="flex flex-col gap-1">
<label className="text-[0.786rem] font-medium text-[var(--text-tertiary)] uppercase tracking-wide flex items-center gap-1.5">
<label className="text-[0.714rem] font-medium text-[var(--text-tertiary)] uppercase tracking-wide flex items-center gap-1.5">
<Layers size={10} /> Label
</label>
<input
Expand All @@ -351,7 +351,7 @@ function GroupEditor({
/>
</div>
<div className="flex flex-col gap-1">
<label className="text-[0.786rem] font-medium text-[var(--text-tertiary)] uppercase tracking-wide">Colour</label>
<label className="text-[0.714rem] font-medium text-[var(--text-tertiary)] uppercase tracking-wide">Colour</label>
<div className="flex items-center gap-2">
{GROUP_COLORS.map((c) => (
<button
Expand Down Expand Up @@ -384,7 +384,7 @@ function Field({
const base = "w-full text-xs bg-[var(--surface-2)] border border-[var(--border)] rounded-lg px-2.5 py-1.5 text-[var(--text-primary)] placeholder-[var(--text-tertiary)] focus:outline-none resize-none";
return (
<div className="flex flex-col gap-1">
<label className="text-[0.786rem] font-medium text-[var(--text-tertiary)] uppercase tracking-wide">{label}</label>
<label className="text-[0.714rem] font-medium text-[var(--text-tertiary)] uppercase tracking-wide">{label}</label>
{multiline ? (
<textarea
rows={3}
Expand Down
4 changes: 2 additions & 2 deletions src/components/graph/MatrixCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,11 @@ export function MatrixCanvas({ nodes, onNodeClick, selectedNodeId }: Props) {
{/* Legend */}
<div className="flex items-center gap-4 mt-3 px-1">
<div className="flex items-center gap-1.5">
<div className="w-3 h-3 rounded-sm opacity-50" style={{ background: tagColors[0] ?? "#6366f1" }} />
<div className="w-3 h-3 rounded-sm opacity-50" style={{ background: tagColors[0] ?? "var(--accent)" }} />
<span className="text-[0.714rem] text-[var(--text-tertiary)]">co-occurrence</span>
</div>
<div className="flex items-center gap-1.5">
<div className="w-3 h-1.5 rounded-full" style={{ background: tagColors[0] ?? "#6366f1" }} />
<div className="w-3 h-1.5 rounded-full" style={{ background: tagColors[0] ?? "var(--accent)" }} />
<span className="text-[0.714rem] text-[var(--text-tertiary)]">diagonal = total per tag</span>
</div>
<span className="text-[0.714rem] text-[var(--text-tertiary)] opacity-50 ml-2">click a cell to inspect</span>
Expand Down
Loading