Skip to content

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

10.8 KB
Raw Blame
/*
  Scheduled workspace — the task column and one task's page (facts, instruction,
  its own run history, and the in-page run transcript). Destination-page chrome
  and the create form stay with their own partials; this file owns only what the
  master-detail workspace adds. Every value comes from the token scales so the
  surface follows the active theme and the font-scale setting.
*/

.scheduled-frame {
  /* The workspace is a workbench, not a list: keep the page rhythm and leave a
     little less air at the end than a card list needs. */
  padding-bottom: 32px;
}

.scheduled-workspace {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.scheduled-editor-slot {
  margin-bottom: 16px;
}

.scheduled-error {
  margin-bottom: 16px;
}

/* ---- card shell ---------------------------------------------------------- */

.scheduled-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: var(--radius-lg-plus);
  background: var(--ds-tile);
  padding: 12px 14px;
}

.scheduled-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.scheduled-card-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  color: var(--ds-text-muted);
  font-size: var(--text-xs-plus);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.scheduled-card-count {
  flex: 0 0 auto;
  border-radius: var(--radius-full);
  padding: 1px 7px;
  background: color-mix(in oklab, var(--ds-text-primary) 6%, transparent);
  color: var(--ds-text-muted);
  font-size: var(--text-3xs);
  font-variant-numeric: tabular-nums;
}

.scheduled-hint {
  margin: 0;
  color: var(--ds-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-body);
}

/* ---- task column --------------------------------------------------------- */

.scheduled-rail {
  position: sticky;
  top: calc(var(--ds-toolbar-height) + 12px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.scheduled-rail-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}

.scheduled-task {
  display: grid;
  width: 100%;
  gap: 3px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 8px 10px;
  background: transparent;
  text-align: left;
  transition: background var(--motion-duration-fast) var(--motion-ease-out);
}

.scheduled-task:hover {
  background: var(--ds-bg-hover);
}

/* Selection has to read on both themes: the raised fill is white on white in
   the light theme, so the row also carries an accent tint and a leading bar. */
.scheduled-task.is-selected {
  background: color-mix(in oklab, var(--ds-accent) 12%, var(--ds-raised));
  box-shadow: var(--ds-raised-shadow), inset 2px 0 0 var(--ds-accent);
}

.scheduled-task-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.scheduled-task-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ds-text-primary);
  font-size: var(--text-md);
  font-weight: var(--font-weight-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheduled-task-live {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--ds-warning);
  animation: scheduled-live-pulse 1.6s var(--motion-ease-standard) infinite;
}

@keyframes scheduled-live-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

.scheduled-task-paused {
  flex: 0 0 auto;
  border-radius: var(--radius-full);
  padding: 1px 7px;
  background: color-mix(in oklab, var(--ds-text-primary) 6%, transparent);
  color: var(--ds-text-muted);
  font-size: var(--text-3xs);
}

.scheduled-task-cadence {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: var(--ds-text-muted);
  font-size: var(--text-xs);
}

.scheduled-task-last {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: var(--ds-text-secondary);
  font-size: var(--text-xs);
}

.scheduled-task-last-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheduled-task-last.is-completed {
  color: var(--ds-success);
}

.scheduled-task-last.is-error {
  color: var(--ds-error);
}

.scheduled-task-last.is-empty {
  color: var(--ds-text-muted);
}

/* ---- task page ----------------------------------------------------------- */

.scheduled-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.scheduled-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.scheduled-detail-heading {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.scheduled-detail-title {
  margin: 0;
  color: var(--ds-text-primary);
  font-size: var(--text-lg-plus);
  font-weight: var(--font-weight-strong);
  letter-spacing: var(--tracking-tight);
}

.scheduled-detail-badges,
.scheduled-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.scheduled-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 16px;
  margin: 0;
  border-radius: var(--radius-lg);
  background: var(--ds-tile);
  padding: 12px 14px;
}

.scheduled-fact {
  min-width: 0;
}

.scheduled-fact-label {
  color: var(--ds-text-muted);
  font-size: var(--text-3xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.scheduled-fact-value {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--ds-text-primary);
  font-size: var(--text-sm-plus);
  line-height: var(--leading-compact-plus);
}

.scheduled-fact-run.is-completed {
  color: var(--ds-success);
}

.scheduled-fact-run.is-error {
  color: var(--ds-error);
}

.scheduled-fact-run.is-running {
  color: var(--ds-warning);
}

/* ---- instruction --------------------------------------------------------- */

.scheduled-disclosure {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  background: transparent;
  color: var(--ds-text-muted);
  font-size: var(--text-2xs);
  transition: color var(--motion-duration-fast) var(--motion-ease-out);
}

.scheduled-disclosure:hover,
.scheduled-disclosure:focus-visible {
  color: var(--ds-text-primary);
}

.scheduled-instruction {
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  color: var(--ds-text-secondary);
  font-size: var(--text-sm-plus);
  line-height: var(--leading-body);
  white-space: pre-wrap;
}

.scheduled-instruction.is-open {
  display: block;
  max-height: 320px;
  overflow-y: auto;
  color: var(--ds-text-primary);
}

/* ---- run history --------------------------------------------------------- */

.scheduled-runs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scheduled-run {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  transition: background var(--motion-duration-fast) var(--motion-ease-out);
}

.scheduled-run:hover {
  background: var(--ds-bg-hover);
}

/* The selected run follows the task column's language: accent tint plus the
   same leading bar, one step lighter because it sits inside a card. */
.scheduled-run.is-selected {
  background: color-mix(in oklab, var(--ds-accent) 10%, var(--ds-tile-deep));
  box-shadow: inset 2px 0 0 var(--ds-accent);
}

.scheduled-run-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 7px 8px;
  background: transparent;
  text-align: left;
}

.scheduled-run-glyph {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--ds-text-muted);
}

.scheduled-run-glyph.is-completed {
  color: var(--ds-success);
}

.scheduled-run-glyph.is-error {
  color: var(--ds-error);
}

.scheduled-run-glyph.is-running {
  color: var(--ds-warning);
}

.scheduled-run-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.scheduled-run-state {
  color: var(--ds-text-primary);
  font-size: var(--text-sm-plus);
  font-weight: var(--font-weight-medium);
}

.scheduled-run-meta {
  overflow: hidden;
  color: var(--ds-text-muted);
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheduled-run-chevron {
  flex: 0 0 auto;
  color: var(--ds-text-muted);
  transition: transform var(--motion-duration-fast) var(--motion-ease-out);
}

.scheduled-run-chevron.is-open {
  transform: rotate(180deg);
}

.scheduled-icon-btn {
  display: inline-flex;
  height: 26px;
  width: 26px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ds-text-muted);
  transition:
    background var(--motion-duration-fast) var(--motion-ease-out),
    color var(--motion-duration-fast) var(--motion-ease-out);
}

.scheduled-icon-btn:hover:not(:disabled),
.scheduled-icon-btn:focus-visible {
  background: var(--ds-bg-hover);
  color: var(--ds-text-primary);
}

.scheduled-icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- run content --------------------------------------------------------- */

.scheduled-content-meta {
  flex: 0 0 auto;
  color: var(--ds-text-muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}

.scheduled-transcript {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 420px;
  overflow-y: auto;
}

.scheduled-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 0;
  border-top: 1px solid var(--ds-border-subtle);
}

.scheduled-message:first-child {
  border-top: 0;
}

.scheduled-message-role {
  color: var(--ds-text-muted);
  font-size: var(--text-3xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.scheduled-message-text {
  margin: 0;
  max-height: 260px;
  overflow: auto;
  overflow-wrap: anywhere;
  color: var(--ds-text-primary);
  font-size: var(--text-sm-plus);
  line-height: var(--leading-body);
  white-space: pre-wrap;
}

.scheduled-message-tool .scheduled-message-text,
.scheduled-message-system .scheduled-message-text {
  color: var(--ds-text-secondary);
}

.scheduled-message-text[data-status="error"] {
  color: var(--ds-error);
}

.scheduled-transcript-more {
  padding-bottom: 6px;
}

/* ---- responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .scheduled-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .scheduled-rail {
    position: static;
  }

  .scheduled-rail-list {
    max-height: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scheduled-task,
  .scheduled-run,
  .scheduled-run-chevron,
  .scheduled-icon-btn,
  .scheduled-disclosure {
    transition: none;
  }

  .scheduled-task-live {
    animation: none;
  }
}