feat(admin-console): improve route and filter management (#10)

* fix(nuxt): pre-bundle the CommonJS deps of the markdown stack

`debug` and `extend` are imported by micromark and unified through
@elysola/ui. Served unbundled by the dev server they have no default
export, so the console page failed with a 500 in `nuxt dev`.

* docs(deployment): list the fragments and feishu link migrations

The manual `d1 execute` fallback stopped at 0008, and AGENTS.md named
0001..0010 although 0011 already exists.

* feat(storage): persist the per-group route order

Routes used to load in id order, so the order saved from the console
was lost on the next read. Migration 0012 adds `d1_routes.position`:
saving writes each route's index within its own group (saving one group
never shifts another), and routes load by `group_id, position, id`.

A database without the column keeps working: only a "no such column" /
"has no column named" error falls back to the legacy statements, and
nothing is cached, so a later migration is picked up on the next call.

* feat(console): add in-app destructive-action confirmation

Deleting a route or a group used `window.confirm`, which blocks the page
and ignores the console theme. A promise-based `useConfirm()` now drives
one <ConfirmDialog /> built on the reka-ui AlertDialog that
@elysola/ui ships; reka-ui is pre-bundled so dev keeps a single copy and
the dialog stacks with the Rc dialogs.

A request never outlives its asker: one made after the asking component
unmounted resolves false, and one still open when it unmounts is
cancelled.

* feat(console): confirm member and webhook removal

Removing a member, revoking an invite link and disabling a group's
webhook endpoint took effect on the first click. They now ask first;
disabling the webhook explains that senders still using the secret will
be rejected, and its button is styled as destructive.

* feat(console): confirm removing filled editor rows

Filter conditions and groups, delivery targets, saved fragments and forge
hosts vanished on a single click, taking whatever had been typed with
them. Rows holding content now ask first, while empty, never-filled
rows (`isBlankNode`: default operator, no path, no values, not negated)
are still removed directly.

* fix(i18n): remove duplicate button glyphs

"New Route", "New Group" and the group cards' "Open" link render a Plus
or ArrowRight icon next to their label, so the "+" and "→" baked into
the strings appeared twice.

* style(console): redesign route cards for narrow screens

The card was one flex row whose badges, filter chips, targets and five
hand-drawn icon buttons squeezed the route name on small screens. It is
now a grid driven by a container query: name and actions share the top
line, the filter summary (clamped to two lines) and targets follow, and
the tags wrap below; from 40rem the tags move up beside the title.

Targets of the same platform collapse into one tag with a count, long
ids truncate instead of widening the page, and the actions use lucide
icons with accessible labels.

* feat(console): reorder a group's routes by drag or keyboard

The per-card up/down arrows saved after every single step, so moving a
route five places took five writes. A Reorder mode on the group page now
swaps each card's switch for a drag handle: pointer drags (mouse and
touch) slide the neighbours out of the way and auto-scroll near the
viewport edges, Arrow Up/Down on a focused handle moves a card by one
and is announced to screen readers, and nothing is written until Save
order. Cancel or Escape (unless a dialog or list owns it) drops the
draft.

The cards move into a new RouteList component that owns the drag state.

* style(members): align member cards and invite actions

* style(group-editor): size forge and log target controls

Keep source hosts, platform selectors and remove actions aligned without stretching short controls across the dialog. Wrap component roots explicitly so their internal markup cannot break the grid.

* style(route-editor): group options and delivery target fields

Give each target labeled fields and a compact platform header, widen the filter workspace, and align fragment controls. Scroll failed validation into view when the footer is far from the affected section.

* feat(filters): add bilingual suggestions and value validation

Catalog forge events, actions, payload paths and known values with searchable English and Chinese descriptions. Match-value validation mirrors the server and only rejects inputs that cannot match.

* feat(filters): add searchable creatable value inputs

Build a theme-aligned combobox on the shared reka-ui primitives. Rank stored keys before bilingual descriptions, allow validated custom values, and preserve unconfirmed multi-value drafts instead of silently committing them.

* feat(filter-editor): integrate searchable condition inputs

Replace chip-only values with context-aware bilingual inputs and a compact condition grid. Preserve drafts across tree changes, block saves and tests until drafts are resolved, and keep keyword filters free of hidden operators.

* feat(filters): split pasted values without breaking regexes

Accept multiple values separated by commas or lines while retaining commas inside wrapped expressions and raw regex patterns. Pasting replaces the selected range and keeps rejected values as an explicit draft.

* fix(filters): adapt suggestions to the selected operator

Offer literal prefixes and suffixes for substring operators, escaped anchored patterns for regex, and numeric suggestions only for comparisons. Suggestion syntax must mean what the selected matcher actually reads.

* fix(filters): preserve regex meaning when changing operators

Swap wrapped and raw regex sources only when both compile identically after saving. Leave literal, glob, multiline and Unicode-sensitive comparisons unchanged rather than inventing non-equivalent conversions.

* a11y(filter-editor): label type and operator controls

Associate each fixed select with a stable per-condition label while keeping the compact visual layout unchanged.

* fix(editors): ignore accidental backdrop dismissal

Do not discard unsaved route or group edits when the user clicks outside the dialog. Preserve Escape, Cancel and explicit close, including popovers and confirmation dialogs stacked above the editor.

* feat(dispatch)!: scope stop and fallback to each group

A match in one group must not suppress delivery in another group. Track regular matches and stopped scopes independently, and document the routing-table boundary.

BREAKING CHANGE: stop and fallback no longer apply globally across
groups. Put mutually exclusive routes in the same group and define
fallback routes in each group that needs its own catch-all.

* fix(dispatch): honor stop on a matching fallback route

Once a fallback matches with stop enabled, skip later routes of the same group without affecting other groups. Cover multiple fallback routes in the group-isolation regression test.

* style(console): pin theme and language controls to the right

Separate utility controls from page actions so narrow screens retain a readable title column and right-aligned actions below. Wrap long headings without letting them push controls out of view.

* style(groups): place creation beside the aligned group count

Keep the new-group action inside the group list at every width and align the label and count on one baseline with a consistent type scale.

* style(groups): align card footers and keep role badges intact

Give long names two lines, show the current role in its own non-wrapping row, and anchor every card footer to the grid-row bottom regardless of optional source metadata.

* style(logs): prevent filter labels and metadata overflow

Keep filter labels on one line and allow long channel, thread and repository identifiers to wrap instead of widening the page.

* style(console): scale the sidebar and hide mobile tab tracks

Narrow the sidebar proportionally while retaining enough room for both locales. Keep mobile navigation swipeable without a visible horizontal scrollbar.

* feat(console): give each group its own routes URL

Resolve the selected group from /admin/groups/{groupId}, validate console paths, and use browser history for back navigation. Keep Groups active and let an active mobile-tab tap return to the list. Scope pending route loads to their group and retain the count beside long headings.

* feat(console): confirm leaving unsaved page work

Guard route changes when an editor or changed order draft is open. Cancel superseded questions and restore the shown history entry when repeated Back or Forward navigation is refused; only completed navigation resets page work.

* feat(console): confirm sign-out from desktop and mobile

Expose sign-out in the mobile topbar when the sidebar is hidden. Both entry points use the in-app confirmation before navigating to the server logout endpoint.

* fix(console): keep topbar tools clear of very narrow headings

Below 360px, place the full-width heading beneath the breadcrumb and utility row so the three top-right buttons cannot overlap it.

* feat(console): prioritize group titles over actions

Place New Route after Reorder in the group bar. Measure available space and remove the reorder label first, then the creation label, before truncating the group title; remeasure on resize, locale and font changes.

* fix(editors): focus the dialog without selecting its name field

Cancel the non-bubbling FocusScope mount event in the capture phase and focus the dialog itself. Keep keyboard navigation working without highlighting the name or opening the touch keyboard automatically.

* perf(console): preserve one instance across admin navigation

Use a fixed page key instead of remounting the whole console for each URL. Refresh each view when shown and isolate overview metrics and logs so page filters cannot leak into the dashboard.

* fix(console-data): discard superseded load responses

Only the latest request may update a list, its error or loading state. Invalidate pending group loads after a save so an older response cannot restore stale configuration during persistent-console navigation.

* fix(routes): serialize writes and reject unloaded route lists

Whole-list saves must start from loaded data and wait for other route writes. Lock switches and actions during saves, recheck deletion after confirmation, and rebuild saved ordering from the newest route objects.

* fix(editors): scope async results and fragment writes to sessions

A completed save or dry run must not close or overwrite a newer editor. Keep fragment state scoped by group, reject writes until the real list is ready, and retain in-flight fragment locks across navigation.

* fix(groups): serialize edits and isolate group detail panels

Prevent overlapping whole-list writes, avoid duplicate ids after rename, and discard delete confirmations prepared on a page that has since been left. Key member and webhook panels by group so local state cannot cross tenants.

* fix(console): omit the empty action row outside overview

Render the refresh-action container only where it has content so narrow layouts do not reserve a blank row after creation controls move into their page bars.

* perf(metrics): send all seven queries in one D1 batch

Avoid seven sequential network round trips and read totals, breakdowns and recent failures in one consistent transaction. Reuse the failed-send statement and row mapping while retaining group scoping.

* fix(admin-api): bypass browser cache locks for live requests

Use no-store on both client requests and admin responses. Personalized live data must not be reused, and one stalled same-URL cache entry must not block later log requests behind the browser cache lock.

* docs(routes): Clarify fallback hints and document group-scoped stop and fallback upgrade behavior
This commit is contained in:
翅膀喵 authored and GitHub committed 2026-10-17 21:13:20 +08:00
1 parent 29b15f4933
commit dbf162bf74
55 files changed
+5778 -985

No files matched your search

+533 -143
View File
@@ -213,26 +213,6 @@
@apply px-6 py-3 text-sm;
}
.icon-btn {
@apply grid h-[30px] w-[30px] place-items-center cursor-pointer rounded-sm border border-border bg-transparent text-[13px] text-muted transition-all duration-150;
}
.icon-btn:hover {
@apply border-accent bg-accent-dim text-accent;
}
.icon-btn:disabled {
@apply cursor-not-allowed opacity-35;
}
.icon-btn:disabled:hover {
@apply border-border bg-transparent text-muted;
}
.icon-btn.danger:hover {
@apply border-bad bg-bad-dim text-bad;
}
/* ---- Cards ---- */
.card {
@apply animate-rise rounded border border-border bg-surface p-5 transition-[border-color,transform] duration-150;
@@ -283,8 +263,15 @@
}
/* ---- Route cards ---- */
.route-list {
@apply flex flex-col gap-2.5;
container-type: inline-size;
}
.route-card {
@apply flex animate-rise items-center gap-4 rounded-xl border border-border bg-surface px-5 py-3.5 shadow-xs transition-all duration-150;
@apply block animate-rise rounded-xl border border-border bg-surface px-4 py-3 shadow-xs transition-all duration-150;
/* Only the entry delay keeps the hidden state: inline transforms (drag) must win afterwards. */
animation-fill-mode: backwards;
}
.route-card:hover {
@@ -295,28 +282,70 @@
@apply opacity-60;
}
.route-card-main {
@apply min-w-0 flex-1 space-y-2.5;
/* Mobile-first: title row with actions, then filters/targets, then the tags. */
.route-row {
@apply grid items-center gap-x-3 gap-y-2;
grid-template-columns: auto minmax(0, 1fr) auto;
grid-template-areas:
"lead title actions"
"body body body"
"tags tags tags";
}
.route-card-header {
@apply flex flex-wrap items-center gap-2.5;
.route-lead {
@apply flex items-center;
grid-area: lead;
}
.route-card-title {
@apply flex min-w-0 flex-wrap items-center gap-2;
.route-title {
@apply flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1;
grid-area: title;
}
.route-name {
@apply text-[15px] font-semibold tracking-tight text-text;
@apply min-w-0 text-[15px] font-semibold tracking-tight text-text;
overflow-wrap: anywhere;
}
.route-id {
@apply rounded-md bg-surface-2 px-1.5 py-0.5 font-mono text-[11px] text-faint;
}
.route-card-badges {
@apply ml-auto flex flex-wrap items-center gap-1.5;
.route-position {
@apply grid h-5 min-w-5 place-items-center rounded-md bg-accent-dim px-1 font-mono text-[11px] font-semibold text-accent-text tabular-nums;
}
.route-tags {
@apply flex flex-wrap items-center justify-end gap-1.5;
grid-area: tags;
}
.route-actions {
@apply flex items-center gap-0.5;
grid-area: actions;
}
.route-body {
@apply min-w-0 space-y-2;
grid-area: body;
}
@container (min-width: 40rem) {
.route-row {
grid-template-columns: auto minmax(0, 1fr) auto auto;
grid-template-areas:
"lead title tags actions"
". body body body";
}
}
.route-summary {
@apply line-clamp-2 text-[12.5px] leading-relaxed text-muted;
overflow-wrap: anywhere;
}
.route-summary.is-empty {
@apply italic text-faint;
}
.route-badge {
@@ -324,18 +353,18 @@
}
.route-badge-dot {
@apply inline-block h-1.5 w-1.5 rounded-full;
@apply inline-block h-1.5 w-1.5 rounded-full bg-current;
}
.route-badge-dc {
.route-badge-discord {
@apply border-accent/20 bg-accent-dim/30 text-accent-text;
}
.route-badge-tg {
.route-badge-telegram {
@apply border-info/20 bg-info-dim/30 text-info;
}
.route-badge-fs {
.route-badge-feishu {
@apply border-warn/20 bg-warn-dim/30 text-warn;
}
@@ -351,44 +380,12 @@
@apply border-accent/30 bg-accent-dim/20 text-accent-text;
}
.route-card-filters {
@apply flex flex-wrap items-center gap-2 text-xs;
}
.route-chip {
@apply inline-flex items-center gap-1.5 rounded-md border border-border bg-surface-2 px-2.5 py-1 text-[11.5px];
}
.route-chip-type {
@apply font-bold uppercase tracking-wider text-faint text-[10px];
}
.route-chip-val {
@apply font-medium text-text;
}
.route-chip.exclude {
@apply border-bad/20 bg-bad-dim/20;
}
.route-chip.exclude .route-chip-type {
@apply text-bad;
}
.route-chip-empty {
@apply italic text-muted;
}
.route-card-targets {
@apply flex flex-wrap items-center gap-2 text-xs;
}
.route-target {
@apply inline-flex items-center;
}
.route-target-row {
@apply inline-flex items-center gap-1.5 rounded-md border border-border/80 bg-surface-2/60 px-2 py-0.5 text-xs;
@apply inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-md border border-border/80 bg-surface-2/60 px-2 py-0.5 text-xs;
}
.route-target-label {
@@ -396,19 +393,53 @@
}
.route-target-id {
@apply font-mono text-[11.5px] text-text;
@apply min-w-0 truncate font-mono text-[11.5px] text-text;
}
.route-card-actions {
@apply flex shrink-0 items-center gap-1 self-center;
/* ---- Route reordering ---- */
.route-handle {
@apply grid h-9 w-9 cursor-grab place-items-center rounded-lg text-muted transition-colors hover:bg-surface-2 hover:text-text;
touch-action: none;
}
.route-action-btn {
@apply flex h-7 w-7 items-center justify-center rounded-md text-muted transition-colors hover:bg-surface-2 hover:text-text disabled:pointer-events-none disabled:opacity-25;
.route-handle:disabled {
@apply cursor-not-allowed opacity-40 hover:bg-transparent;
}
.route-action-btn-danger:hover {
@apply bg-bad-dim/30 text-bad;
.route-handle:focus-visible {
@apply outline-2 outline-offset-2 outline-accent;
}
.route-list.is-reordering .route-card {
@apply select-none;
}
.route-list.is-dragging .route-card {
transition: transform 180ms ease;
}
.route-list.is-dragging .route-handle {
@apply cursor-grabbing;
}
.route-list .route-card.is-dragged {
@apply relative z-10 border-accent shadow-lg;
transition: none;
}
.route-list .route-card.is-dragged.is-settling {
transition: transform 150ms ease;
}
.route-list.is-committing .route-card {
transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
.route-list.is-dragging .route-card,
.route-list .route-card.is-dragged.is-settling {
transition: none;
}
}
/* ---- Toggle switch ---- */
@@ -522,6 +553,11 @@
padding: 0 !important;
}
/* The dialog itself takes focus on open (useDialogFocus); its fields show the ring. */
.editor-dialog:focus {
outline: none;
}
.editor-dialog > div:first-child {
margin-bottom: 0 !important;
flex-shrink: 0 !important;
@@ -559,10 +595,6 @@
@apply truncate text-base font-extrabold tracking-tight;
}
.editor-head .icon-btn {
@apply h-8 w-8 rounded-full;
}
.editor-body {
@apply flex-1 overflow-y-auto px-6 py-5;
scrollbar-width: thin;
@@ -668,29 +700,52 @@
@apply w-full;
}
.target-row {
@apply mb-2 grid grid-cols-[minmax(130px,1fr)_auto] items-center gap-2 rounded-sm border border-border bg-surface-2 p-2.5 max-sm:grid-cols-[1fr_auto];
grid-template-areas:
"select del"
"in1 in2";
.option-list {
@apply mb-4 flex flex-col gap-3;
}
.target-row select {
@apply w-full rounded border border-border-strong bg-surface px-2 py-1.5 font-ui text-[12.5px] font-medium text-text;
grid-area: select;
.option-row {
@apply flex flex-col items-start gap-1;
}
.target-row input.tg-in1 {
grid-area: in1;
/* Indented to line up with the checkbox label text. */
.option-hint {
@apply m-0 pl-[1.625rem] text-[11.5px] leading-snug text-faint;
}
.target-row input.tg-in2 {
grid-area: in2;
.ctl-md {
@apply w-full max-w-64;
}
.target-row > .icon-btn {
grid-area: del;
justify-self: end;
.ctl-stack {
@apply mt-2 flex w-full max-w-md flex-col gap-2;
}
.target-card {
@apply mb-2 flex flex-col gap-2.5 rounded-lg border border-border bg-surface-2 p-3;
}
.target-card-head {
@apply flex items-center justify-between gap-2;
}
.target-platform {
@apply w-44 max-w-full;
}
.target-field {
@apply grid items-center gap-x-3 gap-y-1;
grid-template-columns: 7rem minmax(0, 28rem);
}
.target-field > label {
@apply text-xs font-semibold text-muted;
}
@media (max-width: 640px) {
.target-field {
grid-template-columns: minmax(0, 1fr);
}
}
.add-filter {
@@ -698,91 +753,404 @@
}
.forge-source-row {
@apply mb-2 grid items-center gap-2 rounded-sm border border-border bg-surface-2 p-2.5;
@apply mb-2 grid items-center gap-2 rounded-lg border border-border bg-surface-2 p-2.5;
grid-template-areas:
"host type del"
"name name name";
grid-template-columns: 1fr auto auto;
grid-template-columns: minmax(0, 1fr) 8rem auto;
}
.forge-source-row .f-host {
grid-area: host;
}
.forge-source-row .select.forge-type {
.forge-source-row .f-type {
grid-area: type;
@apply w-[110px];
}
.forge-source-row .f-del {
grid-area: del;
}
.forge-source-row .f-name {
grid-area: name;
}
.forge-source-row > .icon-btn {
grid-area: del;
justify-self: end;
/* ---- Filter combobox (FilterCombobox.vue; its popover is portaled, so not scoped) ---- */
.filter-combo {
position: relative;
width: 100%;
min-width: 0;
}
.filter-combo-anchor {
display: flex;
min-height: 2.25rem;
width: 100%;
align-items: center;
gap: 0.25rem;
border-radius: 0.5rem;
background: rgb(var(--wh-surface));
padding: 0 0.375rem 0 0.75rem;
box-shadow:
inset 0 0 0 1px rgb(var(--wh-border-strong)),
0 1px 2px rgb(0 0 0 / 0.05);
cursor: text;
transition: box-shadow 150ms ease;
}
.filter-combo-anchor:focus-within {
box-shadow: inset 0 0 0 2px rgb(var(--wh-accent));
}
.filter-combo-anchor.is-invalid {
box-shadow: inset 0 0 0 1px rgb(var(--wh-bad));
}
.filter-combo-anchor.is-invalid:focus-within {
box-shadow: inset 0 0 0 2px rgb(var(--wh-bad));
}
.filter-combo-anchor.is-multi {
flex-wrap: wrap;
padding: 0.25rem 0.375rem 0.25rem 0.375rem;
}
.filter-combo-chip {
display: inline-flex;
max-width: 100%;
align-items: center;
gap: 0.25rem;
border-radius: 0.375rem;
background: rgb(var(--wh-accent-dim));
padding: 0.125rem 0.25rem 0.125rem 0.5rem;
color: rgb(var(--wh-accent-text));
font-family: var(--font-mono);
font-size: 0.72rem;
font-weight: 500;
line-height: 1.25rem;
}
.filter-combo-chip.is-invalid {
background: rgb(var(--wh-bad-dim));
color: rgb(var(--wh-bad));
text-decoration: line-through;
text-decoration-color: rgb(var(--wh-bad) / 0.6);
}
.filter-combo-chip.is-invalid .filter-combo-chip-x {
color: rgb(var(--wh-bad));
}
.filter-combo-chip-text {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.filter-combo-chip-x {
display: grid;
flex: none;
width: 1.125rem;
height: 1.125rem;
place-items: center;
border-radius: 9999px;
color: rgb(var(--wh-accent));
cursor: pointer;
}
.filter-combo-chip-x:hover {
background: rgb(var(--wh-accent) / 0.15);
}
.filter-combo-chip-x:focus-visible {
outline: 2px solid rgb(var(--wh-accent));
outline-offset: 1px;
}
.filter-combo-input {
min-width: 4rem;
flex: 1 1 4rem;
border: 0;
background: transparent;
padding: 0.375rem 0;
color: rgb(var(--wh-text));
font-size: 0.8125rem;
outline: none;
}
.filter-combo-anchor.is-multi .filter-combo-input {
padding-left: 0.375rem;
}
.filter-combo-input.is-mono {
font-family: var(--font-mono);
font-size: 0.78rem;
}
.filter-combo-input::placeholder {
color: rgb(var(--wh-faint));
}
.filter-combo-trigger {
display: grid;
flex: none;
width: 1.5rem;
height: 1.5rem;
place-items: center;
border-radius: 0.375rem;
color: rgb(var(--wh-faint));
}
.filter-combo-trigger:hover {
color: rgb(var(--wh-text));
}
.filter-combo-error {
margin: 0.3rem 0 0;
color: rgb(var(--wh-bad));
font-size: 0.72rem;
}
.filter-combo-pending {
margin: 0.3rem 0 0;
color: rgb(var(--wh-warn));
font-size: 0.72rem;
}
.filter-combo-content {
z-index: 55;
width: max(var(--reka-combobox-trigger-width), 17rem);
max-width: calc(100vw - 1rem);
overflow: hidden;
border-radius: 0.5rem;
background: rgb(var(--wh-surface));
box-shadow:
inset 0 0 0 1px rgb(var(--wh-border)),
0 4px 6px -1px rgb(0 0 0 / 0.1),
0 2px 4px -2px rgb(0 0 0 / 0.1);
color: rgb(var(--wh-text));
}
.filter-combo-content[data-state="open"] {
animation: filter-combo-in 120ms ease-out;
}
@keyframes filter-combo-in {
from {
opacity: 0;
transform: translateY(-2px);
}
}
.filter-combo-viewport {
max-height: min(18rem, var(--reka-combobox-content-available-height, 18rem));
overflow-y: auto;
padding: 0.25rem;
overscroll-behavior: contain;
}
.filter-combo-group {
padding: 0.5rem 0.625rem 0.25rem;
color: rgb(var(--wh-faint));
font-size: 0.65rem;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.filter-combo-item {
position: relative;
display: flex;
min-height: 2rem;
align-items: center;
gap: 0.75rem;
border-radius: 0.375rem;
padding: 0.375rem 2rem 0.375rem 0.625rem;
font-size: 0.8125rem;
outline: none;
cursor: pointer;
user-select: none;
}
.filter-combo-item[data-highlighted] {
background: rgb(var(--wh-surface-3));
}
.filter-combo-item-value {
flex: none;
font-family: var(--font-mono);
font-size: 0.78rem;
}
.filter-combo-item-hint {
min-width: 0;
flex: 1 1 auto;
overflow: hidden;
color: rgb(var(--wh-muted));
font-size: 0.75rem;
text-align: right;
text-overflow: ellipsis;
white-space: nowrap;
}
.filter-combo-item-check {
position: absolute;
right: 0.5rem;
display: grid;
place-items: center;
color: rgb(var(--wh-accent));
}
.filter-combo-item.is-create {
color: rgb(var(--wh-accent));
font-weight: 600;
}
.filter-combo-item-create {
min-width: 0;
overflow-wrap: anywhere;
}
.filter-combo-note {
margin: 0;
padding: 0.75rem 0.625rem;
color: rgb(var(--wh-faint));
font-size: 0.75rem;
text-align: center;
}
.filter-combo-note.is-error {
color: rgb(var(--wh-bad));
text-align: left;
}
@media (pointer: coarse) {
.filter-combo-item {
min-height: 2.5rem;
}
}
@media (prefers-reduced-motion: reduce) {
.filter-combo-content[data-state="open"] {
animation: none;
}
}
/* ---- Filter tree editor ---- */
.node-editor {
@apply mb-1;
container-type: inline-size;
}
.node-nested {
@apply ml-4 border-l border-border pl-3;
@apply ml-3 border-l border-border pl-2.5;
}
@container (max-width: 26rem) {
.node-nested {
@apply ml-1 pl-1.5;
}
}
/*
* A condition: type · path · operator on one line with the NOT toggle and
* delete pinned top-right, values below. Narrow containers stack the fields
* under the type. Field filters add a path, keyword filters have no
* operator, and `exists` has no values.
*/
.leaf-row {
@apply mb-1.5 flex flex-wrap items-center gap-2 rounded-sm border border-border bg-surface-2 p-2.5;
@apply grid items-start gap-2 rounded-lg border border-border bg-surface p-2.5;
grid-template-columns: minmax(0, 1fr) auto;
grid-template-areas:
"type actions"
"op op"
"values values";
}
.node-select {
@apply w-[120px] shrink-0 rounded border border-border-strong bg-surface px-2 py-1.5 font-ui text-[12.5px] font-medium text-text;
.leaf-row.is-field {
grid-template-areas:
"type actions"
"path path"
"op op"
"values values";
}
.node-path {
@apply w-[160px] shrink-0;
.leaf-row.is-keyword {
grid-template-areas:
"type actions"
"values values";
}
.node-values {
@apply min-w-[180px] flex-1;
.leaf-row.no-values {
grid-template-areas:
"type actions"
"op op";
}
.node-exclude {
@apply flex shrink-0 cursor-pointer items-center gap-1.5 text-[12px] font-medium text-muted;
.leaf-row.is-field.no-values {
grid-template-areas:
"type actions"
"path path"
"op op";
}
@container (min-width: 34rem) {
.leaf-row {
grid-template-columns: 9.5rem 9.5rem minmax(0, 1fr) auto;
grid-template-areas:
"type op . actions"
"values values values values";
}
.leaf-row.is-field {
grid-template-columns: 9.5rem minmax(0, 1fr) 9.5rem auto;
grid-template-areas:
"type path op actions"
"values values values values";
}
.leaf-row.is-keyword {
grid-template-columns: 9.5rem minmax(0, 1fr) auto;
grid-template-areas:
"type . actions"
"values values values";
}
.leaf-row.no-values {
grid-template-areas: "type op . actions";
}
.leaf-row.is-field.no-values {
grid-template-areas: "type path op actions";
}
}
.leaf-row.is-negated {
@apply border-bad/40;
}
.leaf-type {
@apply min-w-0;
grid-area: type;
}
.leaf-path {
@apply min-w-0;
grid-area: path;
}
.leaf-op {
@apply min-w-0;
grid-area: op;
}
.leaf-values {
@apply min-w-0;
grid-area: values;
}
.leaf-actions {
@apply flex items-center gap-1 justify-self-end;
grid-area: actions;
}
.node-group {
@apply mb-1.5 rounded-sm border border-border bg-surface-2 p-2.5;
@apply flex flex-col gap-2 rounded-lg border border-border bg-surface-2 p-2.5;
}
.node-group-head {
@apply mb-2 flex flex-wrap items-center gap-2;
@apply flex flex-wrap items-center gap-2;
}
.node-combo {
@apply w-[130px] rounded border border-border-strong bg-surface px-2 py-1.5 font-ui text-[12.5px] font-semibold text-text;
.node-kind > * {
@apply whitespace-nowrap;
}
.node-combo-label {
@apply inline-flex items-center rounded border border-border-strong bg-surface px-2 py-1.5 font-ui text-[12.5px] font-semibold text-text;
}
.node-actions {
@apply ml-auto flex flex-wrap items-center gap-1.5;
}
.node-add {
@apply px-2 py-1 text-[12px];
.node-not-label {
@apply inline-flex items-center rounded-md bg-bad-dim px-2.5 py-1 text-xs font-semibold text-bad;
}
.node-children {
@apply flex flex-col gap-1.5;
@apply flex flex-col gap-2;
}
.node-empty {
@apply py-1 text-[12px] italic text-muted;
}
.node-add {
@apply flex flex-wrap items-center gap-1;
}
.test-event {
@apply max-w-sm;
}
.test-payload {
@apply font-mono text-[12px];
}
@@ -816,7 +1184,7 @@
}
.fragment-row {
@apply flex items-center gap-2 rounded-sm border border-border bg-surface-2 p-2;
@apply flex items-center gap-2 rounded-lg border border-border bg-surface-2 py-1.5 pl-3 pr-1.5;
}
.fragment-name {
@@ -828,7 +1196,11 @@
}
.fragment-save {
@apply flex items-center gap-2;
@apply flex max-w-lg items-center gap-2;
}
.fragment-save-input {
@apply min-w-0 flex-1;
}
.log-block {
@@ -908,11 +1280,12 @@
}
.log-filters {
@apply flex items-center gap-1.5;
@apply flex min-w-0 items-center gap-1.5;
}
/* Never squeezed into a column of single characters on narrow screens. */
.filter-label {
@apply text-[11px] font-bold uppercase tracking-wider text-muted;
@apply shrink-0 whitespace-nowrap text-[11px] font-bold uppercase tracking-wider text-muted;
}
.filter-select {
@@ -967,6 +1340,11 @@
@apply mr-1 font-semibold tracking-wider text-faint;
}
/* Long ids (channel/thread, repo) wrap instead of widening the page. */
.log-meta span {
@apply min-w-0 [overflow-wrap:anywhere];
}
.log-meta code {
@apply rounded-[5px] bg-surface-2 px-1.5 py-px font-mono text-text;
}
@@ -1029,8 +1407,9 @@
}
/* ---- Members / invites ---- */
/* RcCard (padding="md") already pads the body; no second padding here. */
.members-panel {
@apply mt-7 rounded border border-border bg-surface p-5;
@apply mt-7 rounded border border-border bg-surface;
}
.panel-head {
@@ -1045,17 +1424,31 @@
@apply my-3.5 mb-2 text-xs;
}
.member-list {
@apply m-0 mb-3 flex list-none flex-col gap-2 p-0;
/* Members flow as compact cards: name, role and remove on one line. */
.member-grid {
@apply m-0 mb-3.5 grid list-none gap-2.5 p-0;
grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.member-card {
@apply grid items-center gap-2 rounded-lg border border-border bg-surface-2 py-1.5 pl-3.5 pr-1.5;
grid-template-columns: minmax(0, 1fr) auto auto;
}
.member-name {
@apply truncate text-[15px] font-semibold tracking-tight text-text;
}
.member-role {
@apply flex w-32 shrink-0 justify-end;
}
.member-row,
.invite-row {
@apply flex flex-wrap items-center gap-2.5 rounded-sm border border-border bg-surface-2 px-3 py-2;
@apply flex flex-wrap items-center gap-x-2.5 gap-y-1.5 rounded-lg border border-border bg-surface-2 py-1.5 pl-3 pr-1.5;
}
.member-login {
@apply min-w-[120px] flex-1 text-[13px] font-semibold;
.invite-actions {
@apply ml-auto flex items-center gap-1;
}
.role-pill {
@@ -1079,12 +1472,9 @@
@apply flex flex-wrap items-center gap-2;
}
.text-input {
@apply min-w-[200px] rounded border border-border bg-surface px-2.5 py-1.5 text-[13px] text-text outline-none;
}
.text-input:focus {
@apply border-accent;
.member-add-login {
@apply min-w-0 max-w-xs;
flex: 1 1 14rem;
}
.invite-box {