modscode JA

modscode / Gallery / flightdeck

flightdeck

Flightdeck: a live agent dashboard for Claude Code. Main model vitals, an on-call architect, every permission check, subagent cards and swimlanes, a turn receipt and a session log, all from real session events

Code you can checkTerminal + desktopPaneStatus lineBoxClientText

What it does

  • Draws a pane
  • Adds /flightdeck
  • Watches tool calls and can refuse them
  • Hooks agent.offer, agent.spawn, classic.UserPromptSubmit, session.append and 7 more

Good points

  • No network calls
  • Starts no processes
  • Written in TypeScript
  • Has a desktop-specific branch

Code to start from

Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.

Starter (register.tsx)

register.tsx
import type { Register } from 'claude-code'

// Drawn like flightdeck by Stephen Casella (pane, status), as modscode read it from the mod's code:
// https://modscode.com/gallery/scasella-flightdeck/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
  // the pane: open it with $.ui.open({ id: 'my-pane', title: "Flightdeck" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text } = $.ui.resolve(e)
    const modelName = '…'
    const architectLabel = '…'
    const label = '…'
    const type = '…'
    const prettyModel = '…'
    const status = '…'
    const steps = '…'
    const text = '…'
    const answer = '…'
    const type2 = '…'
    const type3 = '…'
    const type4 = '…'
    const type5 = '…'
    const type6 = '…'
    const fmtClock = '…'
    const who = '…'
    const fmtClock2 = '…'
    const who2 = '…'
    const text2 = '…'
    const fmtClock3 = '…'
    const who3 = '…'
    const text3 = '…'
    return (
      <Box flexDirection="column">
        <Box justifyContent="center">
          <Text bold wrap="truncate">
            <Text>
              FLIGHTDECK
            </Text>
            <Text>
              {" · "}
            </Text>
            <Text>
              {modelName}
            </Text>
            <Text>
              {" WORKS"}
            </Text>
            <Text>
              {" · "}
            </Text>
            <Text>
              {architectLabel}
            </Text>
            <Text>
              {" ADVISING"}
            </Text>
          </Text>
        </Box>
        <Box justifyContent="center" columnGap={2}>
          <Text>
            <Text>
              ■
            </Text>
            <Text dimColor>
              {` ${label}`}
            </Text>
          </Text>
          <Text>
            <Text>
              ■
            </Text>
            <Text dimColor>
              {` ${label}`}
            </Text>
          </Text>
          <Text>
            <Text>
              ■
            </Text>
            <Text dimColor>
              {` ${label}`}
            </Text>
          </Text>
        </Box>
        <Box flexDirection="column">
          <Box columnGap={2}>
            <Box flexDirection="column">
              <Box flexDirection="column">
                <Box flexDirection="column" borderStyle="single" paddingX={1}>
                  <Text bold wrap="wrap">
                    {type}
                  </Text>
                  <Text dimColor wrap="truncate">
                    {`${type} · ${prettyModel} · ${status} · ${steps} steps`}
                  </Text>
                  <Text>
                    no tool calls yet
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text dimColor wrap="wrap">
                    {`» ${answer}`}
                  </Text>
                </Box>
              </Box>
              <Box flexDirection="column">
                <Box flexDirection="column" borderStyle="single" paddingX={1}>
                  <Text bold wrap="wrap">
                    {type2}
                  </Text>
                  <Text dimColor wrap="truncate">
                    {`${type} · ${prettyModel} · ${status} · ${steps} steps`}
                  </Text>
                  <Text>
                    no tool calls yet
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text dimColor wrap="wrap">
                    {`» ${answer}`}
                  </Text>
                </Box>
              </Box>
              <Box flexDirection="column">
                <Box flexDirection="column" borderStyle="single" paddingX={1}>
                  <Text bold wrap="wrap">
                    {type3}
                  </Text>
                  <Text dimColor wrap="truncate">
                    {`${type} · ${prettyModel} · ${status} · ${steps} steps`}
                  </Text>
                  <Text>
                    no tool calls yet
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text dimColor wrap="wrap">
                    {`» ${answer}`}
                  </Text>
                </Box>
              </Box>
            </Box>
            <Box flexDirection="column">
              <Box flexDirection="column">
                <Box flexDirection="column" borderStyle="single" paddingX={1}>
                  <Text bold wrap="wrap">
                    {type4}
                  </Text>
                  <Text dimColor wrap="truncate">
                    {`${type} · ${prettyModel} · ${status} · ${steps} steps`}
                  </Text>
                  <Text>
                    no tool calls yet
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text dimColor wrap="wrap">
                    {`» ${answer}`}
                  </Text>
                </Box>
              </Box>
              <Box flexDirection="column">
                <Box flexDirection="column" borderStyle="single" paddingX={1}>
                  <Text bold wrap="wrap">
                    {type5}
                  </Text>
                  <Text dimColor wrap="truncate">
                    {`${type} · ${prettyModel} · ${status} · ${steps} steps`}
                  </Text>
                  <Text>
                    no tool calls yet
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text dimColor wrap="wrap">
                    {`» ${answer}`}
                  </Text>
                </Box>
              </Box>
              <Box flexDirection="column">
                <Box flexDirection="column" borderStyle="single" paddingX={1}>
                  <Text bold wrap="wrap">
                    {type6}
                  </Text>
                  <Text dimColor wrap="truncate">
                    {`${type} · ${prettyModel} · ${status} · ${steps} steps`}
                  </Text>
                  <Text>
                    no tool calls yet
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text wrap="truncate">
                    {`✗ ${text}`}
                  </Text>
                  <Text dimColor wrap="wrap">
                    {`» ${answer}`}
                  </Text>
                </Box>
              </Box>
            </Box>
          </Box>
          <Box flexDirection="column" borderStyle="round" paddingX={1}>
            <Text dimColor>
              session log · this agent
            </Text>
            <Text>
              nothing yet
            </Text>
            <Box>
              <Box width={9} flexShrink={0}>
                <Text>
                  {fmtClock}
                </Text>
              </Box>
              <Box width={13} flexShrink={0}>
                <Text bold wrap="truncate">
                  {who}
                </Text>
              </Box>
              <Text wrap="truncate">
                {text}
              </Text>
            </Box>
            <Box>
              <Box width={9} flexShrink={0}>
                <Text>
                  {fmtClock2}
                </Text>
              </Box>
              <Box width={13} flexShrink={0}>
                <Text bold wrap="truncate">
                  {who2}
                </Text>
              </Box>
              <Text wrap="truncate">
                {text2}
              </Text>
            </Box>
            <Box>
              <Box width={9} flexShrink={0}>
                <Text>
                  {fmtClock3}
                </Text>
              </Box>
              <Box width={13} flexShrink={0}>
                <Text bold wrap="truncate">
                  {who3}
                </Text>
              </Box>
              <Text wrap="truncate">
                {text3}
              </Text>
            </Box>
          </Box>
        </Box>
      </Box>
    )
  })
}

The mod's own code

Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.

hooks/register.tsx lines 520–679 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const els = $.ui.resolve(e)
    const { Box, Text, Button } = els
    const hasClient = 'Client' in els
    const [m, u, a, g, cards, lp, lines, t, r, v, now] = await Promise.all([
      getMain($),
      getUsage($),
      getArchitect($),
      getGate($),
      getCards($),
      getLoops($),
      getLog($),
      getTurn($),
      read($, receipt),
      getView($),
      $.clock.now(),
    ])
    const W = Math.max(40, e.props.bodyColumns)
    const layout = v.layout ?? cfg.layout
    const isWide = layout === 'wide' || (layout === 'auto' && W >= 110)
    const colW = isWide ? Math.floor((W - 2) / 2) : W
    const modelName = prettyModel(m.model)
    const viewed = e.props.view?.agentId ?? null
    const advising = isAdvising(a)
    const running = cards.filter(c => c.status === 'running')
    const showArchitect = a.consults.length > 0 || a.ids.length > 0
    const motion = cfg.motion && hasClient
    // A panel with nothing to show yet takes no room: most sessions never spawn an agent.
    const isEmpty: Record<Panel, boolean> = {
      main: false,
      architect: !showArchitect,
      gate: g.recent.length === 0 && gateSummary(g).total === 0,
      agents: cards.length === 0,
      loops: lp.length === 0,
      receipt: !m.isRunning && !r,
      log: false,
    }
    const panels = cfg.panels.filter(p => !isEmpty[p])
    const decider = m.mode === 'auto' ? 'classifier' : 'you'

    // A connector between panels: animated while its flow is live, a dim line otherwise.
    const rail = (key: string, active: boolean, color: string, width: number, marks: number[] = [], isMerge = false) =>
      motion ? (
        <els.Client
          key={key}
          module="./rail.tsx"
          width={width}
          height={1}
          props={{ active, width, color, dim: C.faint, marks, isMerge }}
        />
      ) : (
        <Text color={C.faint}>{'─'.repeat(Math.max(1, width))}</Text>
      )

    // A start time of 0 is unknown (state saved before it was recorded): no clock, not decades.
    const clock = (key: string, since: number, endAt: number | null, color: string) =>
      since <= 0 ? (
        <Text color={color}>—</Text>
      ) : hasClient ? (
        <els.Client key={key} module="./elapsed.tsx" props={{ since, now, endAt, color }} />
      ) : (
        <Text color={color}>{fmtTimer((endAt ?? now) - since)}</Text>
      )

    // ---- main
    const effortN = { low: 1, medium: 2, high: 3, xhigh: 4, max: 4 }[m.effort] ?? 0
    const ctxGauge = u.pct !== null ? gauge(u.pct, 10) : null
    const mainPanel = (w: number) => (
      <Box flexDirection="column" borderStyle="round" borderColor={C.main} paddingX={1} width={w}>
        <Box justifyContent="space-between">
          <Text color={C.main} bold>
            {modelName} · main
          </Text>
          <Text color={m.isRunning ? C.main : C.dim}>{m.isRunning ? '● working' : '○ idle'}</Text>
        </Box>
        <Text wrap="truncate">
          <Text dimColor>effort </Text>
          <Text color={C.main}>{'▮'.repeat(effortN) + '▯'.repeat(4 - effortN)} </Text>
          <Text color={C.main} bold>
            {m.effort || '—'}
          </Text>
          {m.mode ? <Text dimColor>{`   mode ${m.mode}`}</Text> : null}
          <Text dimColor>{`   ${m.steps} req`}</Text>
        </Text>
        {ctxGauge ? (
          <Text wrap="truncate">
            <Text dimColor>ctx </Text>
            <Text color={u.pct !== null && u.pct >= 80 ? C.warn : C.main}>{ctxGauge.on}</Text>
            <Text color={C.faint}>{ctxGauge.off}</Text>
            <Text bold>{` ${Math.round(u.pct ?? 0)}%`}</Text>
            {u.tokens !== null ? <Text dimColor>{` ${kTokens(u.tokens)}/${kTokens(u.window)}`}</Text> : null}
            {u.compactions > 0 ? <Text color={C.amber}>{`  ⟲${u.compactions}`}</Text> : null}
          </Text>
        ) : null}
        {u.costUsd !== null || u.limits.length > 0 ? (
          <Text wrap="truncate">
            {u.costUsd !== null ? <Text color={C.text}>{`${fmtUsd(u.costUsd)}   `}</Text> : null}
            {u.limits.slice(0, 2).map(l => {
              const lg = gauge(l.pct, 5)
              return (
                <Text wrap="truncate">
                  <Text dimColor>{`${limitLabel(l.kind)} `}</Text>
                  <Text color={l.pct >= 80 ? C.warn : C.main}>{lg.on}</Text>
                  <Text color={C.faint}>{lg.off}</Text>
                  <Text dimColor>{` ${Math.round(l.pct)}%  `}</Text>
                </Text>
              )
            })}
          </Text>
        ) : null}
      </Box>
    )

    // ---- architect
    const lastConsult = a.consults[a.consults.length - 1]
    const architectPanel = (w: number) => {
      const tl = consultTimeline(a, now, Math.max(8, w - 4))
      return (
        <Box flexDirection="column" borderStyle="round" borderColor={C.arch} paddingX={1} width={w}>
          <Box justifyContent="space-between">
            <Text color={C.arch} bold>
              {cfg.architectLabel} · {advising ? 'advising' : 'on call'}
            </Text>
            <Text>
              <Text dimColor>consults </Text>
              <Text color={C.arch} bold>
                {a.consults.length}
              </Text>
            </Text>
          </Box>
          <Text color={C.arch}>{tl}</Text>
          {lastConsult ? (
            <Text dimColor wrap="truncate">
              {advising
                ? `consulting since ${fmtClock(lastConsult.at)}`
                : `last ${fmtDuration(now - (lastConsult.endAt ?? lastConsult.at))} ago · took ${fmtDuration((lastConsult.endAt ?? now) - lastConsult.at)}`}
            </Text>
          ) : (
            <Text dimColor>not consulted yet</Text>
          )}
          {cfg.moments ? (
            <Box flexWrap="wrap" columnGap={2}>
              {(['before a plan', 'error repeats', 'before done'] as const).map(mo => {
                const isOn = lastConsult?.moment === mo
                return (
                  <Text color={isOn ? C.arch : C.dim} bold={isOn}>
                    {isOn ? '◆' : '◇'} {mo}
                  </Text>
                )
              })}
              <Text color={C.faint}>(inferred)</Text>
            </Box>
          ) : null}
          {a.lastAdvice ? (
            <Text color={C.arch} wrap="truncate">
              » {a.lastAdvice}
            </Text>
          ) : null}
        </Box>
      )
Licence text (MIT)
MIT License

Copyright (c) 2026 Stephen Casella

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

What its code calls

tool calls

The design, read from code

Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.

What its code shows

Read from the source at commit f31daca523d3 on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.

Decides the listing: code you can check
Entry readEvery module hooks/hooks.json names was read.hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.4 files parsed
All its code is in the modEvery import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod
ReadableNo minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs
Calls in the openNetwork and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open
For you to weigh before installing
Where it drawsThe terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both
Install lineWhether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there
Programs on WindowsWhether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks
NetworkWhether every fetch names its https host in the code.no network
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.starts no programs
Reads and sendsWhether it both reads files or environment variables and reaches the network.reaches no network
Keys in the sourceWhether the source holds what looks like an API key or a private key.no keys in the source
LicenceAn open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT

This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen

Install it

Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.

Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:

/plugin marketplace add scasella/claude-flightdeck
/plugin install flightdeck@claude-flightdeck

This installs the marketplace's latest commit, which may not be the one read here (f31daca523d3). Compare them before you install.

Ask Claude about it

With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:

Read the modscode design "scasella-flightdeck" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs