modscode JA

modscode / Gallery / glanceflow

glanceflow

GlanceFlow: see what Claude is doing, at a glance. Hides tool rows and shows one plain-English checklist above the prompt, with progress, helpers, history, a team report, pause and continue, and a password guard.

Code you can checkTerminal + desktopPaneBandToastBoxButtonSelectText

What it does

  • Draws a pane, a band above the prompt, toasts
  • Watches tool calls and can refuse them
  • Hooks agent.spawn, classic.Notification, classic.Stop, classic.StopFailure and 7 more
  • Keeps its own state between turns
  • Starts processes

Good points

  • No network calls
  • Written in TypeScript
  • Handles errors
  • Writes no files

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 glanceflow by Antreas-Strb (pane, band, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/antreas-strb-glanceflow/
// 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: "History · ‹projectName›" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const projectName = '…'
    const longDay = '…'
    const dayLabel = '…'
    const clockTime = '…'
    const mark = '…'
    const title = '…'
    const details = '…'
    const files = '…'
    const title2 = '…'
    const title3 = '…'
    const total = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="column" marginBottom={1}>
          <Text bold wrap="truncate-end">
            {`${projectName} · ${longDay}`}
          </Text>
          <Box flexDirection="row" gap={1}>
            <Button label="◀ Earlier" />
            <Text bold>
              {dayLabel}
            </Text>
            <Button label="Later ▶" />
            <Button label="Today" />
          </Box>
        </Box>
        <Box flexDirection="column">
          <Box flexDirection="row">
            <Text dimColor>
              {`${clockTime}  `}
            </Text>
            <Text>
              {`${mark} `}
            </Text>
            <Text>
              {title}
            </Text>
            <Text dimColor wrap="truncate-end">
              {` ${details}`}
            </Text>
          </Box>
          <Text dimColor wrap="wrap">
            {`         ${files}`}
          </Text>
        </Box>
        <Box flexDirection="column">
          <Box flexDirection="row">
            <Text dimColor>
              {`${clockTime}  `}
            </Text>
            <Text>
              {`${mark} `}
            </Text>
            <Text>
              {title2}
            </Text>
            <Text dimColor wrap="truncate-end">
              {` ${details}`}
            </Text>
          </Box>
          <Text dimColor wrap="wrap">
            {`         ${files}`}
          </Text>
        </Box>
        <Box flexDirection="column">
          <Box flexDirection="row">
            <Text dimColor>
              {`${clockTime}  `}
            </Text>
            <Text>
              {`${mark} `}
            </Text>
            <Text>
              {title3}
            </Text>
            <Text dimColor wrap="truncate-end">
              {` ${details}`}
            </Text>
          </Box>
          <Text dimColor wrap="wrap">
            {`         ${files}`}
          </Text>
        </Box>
        <Box marginTop={1}>
          <Text bold wrap="truncate-end">
            {`Total: ${total}`}
          </Text>
        </Box>
        <Box flexDirection="row" gap={1} marginTop={1}>
          <Button variant="primary" label="Team report" />
          <Button label="Your week" />
          <Button label="Close" role="dismiss" />
        </Box>
      </Box>
    )
  })

  // the band above the prompt; what else goes there is drawn under it
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const tourStep = '…'
    const length = '…'
    const TOUR = '…'
    return (
      <Box flexDirection="column">
        <Text bold wrap="truncate-end">
          {`Welcome to GlanceFlow · ${tourStep}1 of ${length}`}
        </Text>
        <Text wrap="wrap">
          {TOUR}
        </Text>
        <Box flexDirection="row" gap={2} marginBottom={1}>
          <Button plain label="✓ Got it" />
          <Button plain label="Skip" />
        </Box>
        <Box flexDirection="row" gap={1}>
          <Button plain label="‖ Pause" />
          <Button plain label="▶ Start" />
          <Button plain label="▶ Continue" />
          <Button plain label="▤ Plan" />
          <Button plain label="☰ History" />
          <Button plain label="⚙" />
          <Button plain label="↻ Press again to start a fresh chat" />
        </Box>
        {await next(e)}
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    await $.ui.toast(`Nothing is running right now.`)
    await $.ui.toast(`Paused. Press Continue to pick up where Claude stopped.`)
    return next(e)
  })
}

The mod's own code

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

glanceflow/hooks/glance.tsx lines 2532–2691 · Pane
  on('ui.render', { component: 'Pane', requestId: HISTORY_PANE }, async ($, e) => {
    const table = $.ui.resolve(e)
    const { Box, Text, Button } = table
    const view = await read($, historyAtom)
    const columns = Math.max(30, e.props.bodyColumns)
    const today = dayKey(await now($))
    const close = <Button key="close" label="Close" role="dismiss" onPress={() => $.ui.close({ id: HISTORY_PANE })} />
    if (view === null) {
      return (
        <Box flexDirection="column">
          <Text dimColor>Type /glanceflow history to see today's tasks.</Text>
          {close}
        </Box>
      )
    }

    // Day picker: earlier, a drop-down of saved days, later, and today.
    const dayLabel = (day: string) => (day === today ? `Today, ${day}` : day)
    const picker = (
      <Box key="picker" flexDirection="column" marginBottom={1}>
        <Text key="heading" bold wrap="truncate-end">
          {`${projectName(view.project)} · ${longDay(view.day)}`}
        </Text>
        <Box key="controls" flexDirection="row" gap={1}>
        <Button key="earlier" label="◀ Earlier" onPress={() => showHistory($, shiftDay(view.day, -1), false)} />
        {'Select' in table && table.Select ? (
          <table.Select
            key="day"
            label="Day: "
            value={view.day}
            options={view.days.map(day => ({ value: day, label: dayLabel(day) }))}
            onSelect={day => void showHistory($, day, false)}
          />
        ) : (
          <Text bold>{dayLabel(view.day)}</Text>
        )}
        {view.day < today && (
          <Button key="later" label="Later ▶" onPress={() => showHistory($, shiftDay(view.day, 1), false)} />
        )}
        {view.day !== today && <Button key="today" label="Today" onPress={() => showHistory($, today, false)} />}
        </Box>
      </Box>
    )

    const report = reportOf(view)
    if (view.isReportShown) {
      return (
        <Box flexDirection="column" width={columns}>
          {picker}
          {report.split('\n').map((line, index) => (
            <Text key={`report-${index}`} bold={index === 0} wrap="wrap">
              {line || ' '}
            </Text>
          ))}
          <Box key="report-actions" flexDirection="row" gap={1} marginTop={1}>
            <Button key="copy" variant="primary" label="Copy report" onPress={() => showReport($, true, report, e.surface)} />
            {view.reportSpan === 'mine' ? null : view.reportSpan === 'week' ? (
              <Button key="span" label="This day" onPress={() => showReportSpan($, 'day', e.surface)} />
            ) : (
              <Button key="span" label="This week" onPress={() => showReportSpan($, 'week', e.surface)} />
            )}
            <Button key="back" label="Back to the list" onPress={() => showReport($, false, report, e.surface)} />
            {close}
          </Box>
        </Box>
      )
    }

    if (view.entries.length === 0) {
      return (
        <Box flexDirection="column" width={columns}>
          {picker}
          <Text dimColor>No tasks saved for this project on that day yet.</Text>
          <Box key="actions" flexDirection="row" gap={1} marginTop={1}>
            <Button key="mine" label="Your week" onPress={() => showReportSpan($, 'mine', e.surface)} />
            {close}
          </Box>
        </Box>
      )
    }

    const marks: Record<GlanceHistoryEntry['outcome'], [string, string | undefined]> = {
      done: ['✓', 'green'],
      stopped: ['■', undefined],
      stuck: ['⚠', 'yellow'],
      waiting: ['‖', 'yellow'],
      background: ['◷', 'cyan'],
      working: ['▶', 'cyan'],
    }
    const titleWidth = Math.max(12, Math.min(MAX_NAME, columns - 9 - 36))
    const rows = view.entries.map(one => {
      const [mark, color] = marks[one.outcome]
      const took = one.finishedAt === null ? 'not finished' : formatDuration(one.finishedAt - one.startedAt)
      const details = [
        `${one.stepsDone}/${one.stepsTotal}`,
        took,
        tokenNote(one.newTokens + one.cachedTokens, one.cachedTokens),
        typeof one.costUsd === 'number' ? formatCost(one.costUsd) : '',
      ]
        .filter(Boolean)
        .join(' · ')
      const files = filesNote(entryFiles(one))
      return (
        <Box key={`job-${one.jobId}`} flexDirection="column">
          <Box key="row" flexDirection="row">
            <Text dimColor>{`${clockTime(one.startedAt)}  `}</Text>
            <Text color={color} dimColor={one.outcome === 'stopped'}>{`${mark} `}</Text>
            <Text bold={one.outcome !== 'stopped'}>{fit(one.title, titleWidth)}</Text>
            <Text dimColor wrap="truncate-end">
              {` ${fit(details, Math.max(0, columns - 9 - titleWidth - 1)).trimEnd()}`}
            </Text>
          </Box>
          {files !== '' && (
            <Text key="files" dimColor wrap="wrap">
              {`         ${files}`}
            </Text>
          )}
        </Box>
      )
    })

    const finished = view.entries.filter(one => one.finishedAt !== null)
    const time = finished.reduce((sum, one) => sum + (one.finishedAt! - one.startedAt), 0)
    const newTokens = view.entries.reduce((sum, one) => sum + one.newTokens, 0)
    const cached = view.entries.reduce((sum, one) => sum + one.cachedTokens, 0)
    const priced = view.entries.filter(one => typeof one.costUsd === 'number')
    const spent = priced.reduce((sum, one) => sum + (one.costUsd ?? 0), 0)
    const counts = (Object.keys(marks) as GlanceHistoryEntry['outcome'][])
      .map(outcome => [outcome, view.entries.filter(one => one.outcome === outcome).length] as const)
      .filter(([, count]) => count > 0)
      .map(([outcome, count]) => `${count} ${outcome}`)
    const total = [
      `${view.entries.length} ${view.entries.length === 1 ? 'task' : 'tasks'}`,
      counts.join(', '),
      formatDuration(time),
      tokenNote(newTokens + cached, cached),
      priced.length > 0 ? formatCost(spent) : '',
    ]
      .filter(Boolean)
      .join(' · ')

    return (
      <Box flexDirection="column" width={columns}>
        {picker}
        {rows}
        <Box key="total" marginTop={1}>
          <Text bold wrap="truncate-end">{`Total: ${total}`}</Text>
        </Box>
        <Box key="actions" flexDirection="row" gap={1} marginTop={1}>
          <Button
            key="report"
            variant="primary"
            label="Team report"
            onPress={() => showReportSpan($, view.reportSpan === 'week' ? 'week' : 'day', e.surface)}
          />
          <Button key="mine" label="Your week" onPress={() => showReportSpan($, 'mine', e.surface)} />
          {close}
        </Box>
      </Box>
    )
glanceflow/hooks/glance.tsx lines 2694–2853 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    if (e.props.hasSurvey) {
      return next(e)
    }
    const { Box, Text, Button } = $.ui.resolve(e)
    const isEnabled = await read($, enabledAtom)
    const list = isEnabled ? await read($, checklistAtom) : null
    const tick = list ? await read($, tickAtom) : 0
    const usage = isEnabled ? await read($, usageAtom) : NO_USAGE
    const isDetailed = isEnabled && (await read($, detailAtom)) === 'detailed'
    const isCalm = isEnabled && (await read($, calmAtom))
    const handoff = isEnabled ? await read($, handoffAtom) : 'idle'
    const columns = Math.max(20, e.props.bodyColumns)
    const current = await now($)

    // Plan usage, always in view; it turns yellow, then red, as a window fills.
    const warnings: RenderChildren[] = []
    // Last row: open the history, or hand this chat off to a fresh one (a second press confirms).
    const list0 = isEnabled ? await read($, checklistAtom) : null
    const canPause =
      runningTurn !== undefined &&
      list0 !== null &&
      (list0.phase === 'working' || list0.phase === 'needsYou') &&
      list0.needsYouReason !== WAITING
    const canContinue =
      list0 !== null &&
      (list0.phase === 'stopped' || list0.phase === 'stuck' || (list0.phase === 'needsYou' && list0.needsYouReason === WAITING))
    const actions = isEnabled ? (
      <Box key="actions" flexDirection="row" gap={columns < 44 ? 1 : 2}>
        {canPause && <Button key="pause" plain label="‖ Pause" onPress={() => pauseJob($)} />}
        {list0?.approval === 'waiting' && <Button key="start" plain label="▶ Start" onPress={() => startPlan($)} />}
        {canContinue && <Button key="continue" plain label="▶ Continue" onPress={() => continueJob($)} />}
        {list0?.hasPlan && <Button key="plan" plain label="▤ Plan" onPress={() => showPlan($)} />}
        <Button key="history" plain label="☰ History" onPress={() => showHistory($, dayKey(current), true)} />
        <Button key="settings" plain label={columns < 60 ? '⚙' : '⚙ Settings'} onPress={() => showSettings($)} />
        {list0 !== null && (
        <Button
          key="handoff"
          plain
          label={
            handoff === 'armed'
              ? '↻ Press again to start a fresh chat'
              : handoff === 'working'
                ? '↻ Writing a handoff note…'
                : columns < 40
                  ? '↻ Fresh'
                  : '↻ Fresh chat'
          }
          onPress={() => pressHandoff($)}
        />
        )}
      </Box>
    ) : null
    const usageParts = [
      ...usage.limits.map(one => `${one.label} ${Math.round(one.percent)}%`),
      usage.contextPercent === null ? '' : `chat ${Math.round(usage.contextPercent)}% full`,
    ].filter(Boolean)
    const top = usage.limitPercent ?? 0
    const isHigh = top >= LIMIT_WARN
    const reset = isHigh ? resetTime(usage.limitResetsAt, await now($)) : null
    // The simple view speaks up only near a limit; the detailed view always shows usage.
    if (usageParts.length > 0 && (isDetailed || isHigh)) {
      warnings.push(
        <Box key="limit" width={columns}>
          <Text
            wrap="truncate-end"
            color={top >= LIMIT_ALERT ? 'red' : isHigh ? 'yellow' : undefined}
            dimColor={!isHigh}
          >
            {isHigh
              ? `⚠ You've used ${Math.round(top)}% of your ${usage.limitLabel ?? 'plan'} limit${reset === null ? '' : ` · resets ${reset}`} · ${usageParts.join(' · ')}`
              : `Plan usage: ${usageParts.join(' · ')}`}
          </Text>
        </Box>,
      )
    }
    const tidyAt = isEnabled ? await read($, tidyAtAtom) : 0
    if (usage.contextPercent !== null && tidyAt > 0 && usage.contextPercent >= tidyAt) {
      warnings.push(
        <Box key="long-chat" flexDirection="row" justifyContent="space-between" width={columns}>
          <Box flexShrink={1}>
            <Text wrap="truncate-end" color="yellow">
              {`This chat is ${Math.round(usage.contextPercent)}% full. Claude saves a checkpoint before tidying up.`}
            </Text>
          </Box>
          <Button
            key="compact"
            label="Tidy it up"
            onPress={() => tidyUp($)}
          />
        </Box>,
      )
    }

    if (isEnabled && (await read($, recapAtom))) {
      warnings.push(
        <Box key="recap" flexDirection="row" justifyContent="space-between" width={columns}>
          <Box flexShrink={1}>
            <Text wrap="truncate-end" color="green">
              ✓ Chat tidied up. Claude kept a checkpoint of the work.
            </Text>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Button key="recap" label="Where we left off" onPress={() => showRecap($)} />
            <Button key="recap-ok" plain label="OK" onPress={() => update($, recapAtom, () => false)} />
          </Box>
        </Box>,
      )
    }

    // One button for every choice: Simple → Details → Off.
    const button = (
      <Button
        key="toggle"
        label={
          columns < NARROW
            ? !isEnabled
              ? '○ Off'
              : isDetailed
                ? '● Details'
                : '● Simple'
            : !isEnabled
              ? '○ GlanceFlow: Off'
              : isDetailed
                ? '● GlanceFlow: Details'
                : '● GlanceFlow: Simple'
        }
        variant={isEnabled ? 'primary' : 'secondary'}
        onPress={() => cycleMode($, isEnabled, isDetailed)}
      />
    )
    const headerWidth = Math.max(0, columns - (columns < NARROW ? 15 : 27))
    const row = (header: RenderChildren) => (
      <Box key="header" flexDirection="row" justifyContent="space-between" width={columns}>
        <Box flexShrink={1} flexGrow={1}>
          {header}
        </Box>
        {button}
      </Box>
    )

    const tourStep = isEnabled && list === null ? await read($, tourAtom) : null
    if (tourStep !== null) {
      const isLast = tourStep === TOUR.length - 1
      return (
        <Box flexDirection="column" width={columns}>
          <Text bold wrap="truncate-end">{`Welcome to GlanceFlow · ${tourStep + 1} of ${TOUR.length}`}</Text>
          <Text wrap="wrap">{TOUR[tourStep]}</Text>
          <Box key="tour" flexDirection="row" gap={2} marginBottom={1}>
            <Button key="tour-next" plain label={isLast ? '✓ Got it' : 'Next ▶'} onPress={() => stepTour($, tourStep + 1)} />
            {!isLast && <Button key="tour-skip" plain label="Skip" onPress={() => stepTour($, null)} />}
          </Box>
          {warnings}
          {actions}
        </Box>
      )
    }

    if (list === null) {
      return (
Licence text (MIT)
MIT License

Copyright (c) 2026 Antreas-Strb

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

runs programsreads filesenv varsdrives Claudetool callsremembers

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 f60805f83b72 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.glanceflow/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).glanceflow/hooks/glance.tsx:680 uname (not on Windows); glanceflow/hooks/glance.tsx:749 notify-send (not on Windows)
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.glanceflow/hooks/glance.tsx:690 a program named at run time; glanceflow/hooks/glance.tsx:746 osascript (a shell or interpreter)
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 Antreas-Strb/glanceflow
/plugin install glanceflow@claude-mods

This installs the marketplace's latest commit, which may not be the one read here (f60805f83b72). 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 "antreas-strb-glanceflow" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs