Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

8.7 KB
Raw Blame
html[data-surface="plugin-launcher"],
html[data-surface="plugin-launcher"] body,
html[data-surface="plugin-launcher"] #root {
  background: transparent;
}

.plugin-launcher {
  width: 100%;
  height: 100%;
  padding: 10px;
  display: flex;
  align-items: stretch;
  color: var(--ds-text-primary);
  -webkit-app-region: no-drag;
  app-region: no-drag;
}

.plugin-launcher-surface {
  position: relative;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) 38px;
  border: 1px solid var(--ds-border-strong);
  border-radius: var(--radius-lg-plus);
  background: var(--ds-bg-elevated-opaque);
  /* Border alone: the launcher floats over the desktop in a transparent
     window, where a blurred drop shadow reads as a heavy halo ring. */
  box-shadow: none;
}

.plugin-launcher-search-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  color: var(--ds-text-muted);
}

.plugin-launcher-input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: var(--ds-text-primary);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-tight);
}

.plugin-launcher-input::placeholder {
  color: var(--ds-text-faint);
  font-weight: var(--font-weight-normal);
}

.plugin-launcher-shortcut {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--ds-tile-deep);
  color: var(--ds-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--leading-tight);
}

/*
 * The scroller: the window is sized to the content, so this only scrolls when
 * the clamp in the main process stops the window from growing any further.
 */
.plugin-launcher-results {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 12px 10px;
}

/* Content-sized wrapper: measuring it is how the panel learns its own height. */
.plugin-launcher-results-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-content: start;
}

.plugin-launcher-group {
  min-width: 0;
}

.plugin-launcher-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 2px 4px;
}

.plugin-launcher-group-header h2 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: var(--ds-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium-plus);
  letter-spacing: var(--tracking-wide);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plugin-launcher-group-actions {
  margin-left: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.plugin-launcher-group-action {
  border: 0;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ds-text-faint);
  font-size: var(--text-xs);
  cursor: pointer;
}

.plugin-launcher-group-action:hover {
  color: var(--ds-text-primary);
  background: var(--ds-bg-hover);
}

/*
 * Eight fixed columns. Widening the window widens the tiles; it never reflows
 * them onto other rows, which is what keeps the grid stable while the user
 * drags the panel wider.
 */
.plugin-launcher-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

/* The full plugin list packs its rows upward instead of spreading them. */
.plugin-launcher-grid-all {
  align-content: start;
}

.plugin-launcher-tile {
  position: relative;
  min-width: 0;
}

.plugin-launcher-tile-open {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ds-text-secondary);
  text-align: center;
  cursor: pointer;
}

.plugin-launcher-tile:hover .plugin-launcher-tile-open {
  background: var(--ds-bg-hover);
  color: var(--ds-text-primary);
}

/* Selection is a filled cell, not an outline: the grid stays calm while the
   arrow keys move through it. Keyboard focus keeps its own accent ring. */
.plugin-launcher-tile.active .plugin-launcher-tile-open {
  background: var(--ds-bg-active);
  color: var(--ds-text-primary);
}

.plugin-launcher-tile-open:focus-visible {
  outline: 2px solid var(--ds-accent);
  outline-offset: -2px;
}

/*
 * Every tile carries the same rounded square. Plugin panels and installed
 * applications used to differ by shape and by a word beside the name; the grid
 * now reads as one set of tools, and the whole line below the icon belongs to
 * the name. The icon grew to 48px so it can carry the identity on its own.
 */
.plugin-launcher-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--ds-tile-deep);
  color: var(--ds-text-primary);
}

.plugin-launcher-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  /** A platform icon is already an icon; never stretch it. */
  pointer-events: none;
}

/*
 * An installed application's own icon already carries its shape (the macOS
 * squircle, a Windows tile), so it fills the cell instead of sitting inside a
 * second rounded square.
 */
.plugin-launcher-icon.plugin-launcher-icon-native {
  overflow: visible;
  border-radius: 0;
  background: transparent;
}

.plugin-launcher-icon.plugin-launcher-icon-native img {
  width: 48px;
  height: 48px;
}

.plugin-launcher-monogram {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-tighter);
}

.plugin-launcher-tile-name {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium-plus);
  line-height: var(--leading-compact);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The pin is quiet until the cell is under the pointer or focus. */
.plugin-launcher-pin {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ds-text-faint);
  opacity: 0;
  cursor: pointer;
}

.plugin-launcher-tile:hover .plugin-launcher-pin,
.plugin-launcher-tile.active .plugin-launcher-pin,
.plugin-launcher-tile:focus-within .plugin-launcher-pin,
.plugin-launcher-pin[aria-pressed="true"] {
  opacity: 1;
}

.plugin-launcher-pin[aria-pressed="true"] {
  /* Same text colour as an active tile: the fill, not a hue, marks "pinned". */
  color: var(--ds-text-primary);
}

/* A filled glyph is the "already pinned" state, without a second icon set. */
.plugin-launcher-pin[aria-pressed="true"] svg {
  fill: currentColor;
}

.plugin-launcher-pin:hover {
  background: var(--ds-tile-deep);
  color: var(--ds-text-primary);
}

.plugin-launcher-pin:focus-visible {
  outline: 2px solid var(--ds-accent);
  outline-offset: -2px;
}

/*
 * Empty states are short and fixed: the window follows the content, so a
 * `height: 100%` block would collapse to nothing.
 */
.plugin-launcher-empty {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ds-text-muted);
  font-size: var(--text-sm-plus);
}

.plugin-launcher-empty-action {
  border: 1px solid var(--ds-border);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--ds-tile);
  color: var(--ds-text-secondary);
  font-size: var(--text-xs);
  cursor: pointer;
}

.plugin-launcher-empty-action:hover {
  background: var(--ds-bg-hover);
  color: var(--ds-text-primary);
}

.plugin-launcher-pin-notice {
  min-width: 0;
  overflow: hidden;
  color: var(--ds-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plugin-launcher-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  /* Footer band is a tile, not a rule (D297). */
  background: var(--ds-tile);
  color: var(--ds-text-faint);
  font-size: var(--text-xs);
}

.plugin-launcher-footer strong {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: var(--ds-error);
  font-weight: var(--font-weight-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .plugin-launcher-tile-open,
  .plugin-launcher-pin {
    transition:
      background-color 120ms ease,
      color 120ms ease,
      opacity 120ms ease;
  }

  /* Refused pin: the row it belongs to shakes once, so the eye finds it. */
  .plugin-launcher-pin-group.shaking {
    animation: plugin-launcher-pin-shake 300ms ease;
  }
}

@keyframes plugin-launcher-pin-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}