modscode EN

modscode / 図鑑 / vikunja-tasks

vikunja-tasks

A live Vikunja pane for Claude Code: the Doing, Blocked and To-Do lanes, the task the session is working on, and a button to start a session on a task in its folder

確かめやすいコードターミナル+デスクトップペインステータスライントーストBoxButtonInputMarkdownSelectText

何をするか

  • 欄・ステータス行・トーストを描く
  • /vikunja を足す
  • ツールの呼び出しを見張る(止めることがある)
  • session.startにフックする
  • ネットワークに出る

良いところ

  • TypeScript で書かれている
  • デスクトップ専用の分岐がある
  • エラーを扱う

作り始めるためのコード

2 種類あります。上のデザインから modscode が書いた雛形と、その Mod 自身のコードのうち描いている部分です。

雛形(register.tsx)

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

// Drawn like vikunja-tasks by Tim Moore (pane, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/angusmaul-vikunja-tasks/
// 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: "Vikunja" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button, Select, Input } = $.ui.resolve(e)
    const assignee = '…'
    const project = '…'
    const priority = '…'
    const label = '…'
    const error = '…'
    const query = '…'
    const error2 = '…'
    const identifier = '…'
    const title = '…'
    const dueLabel = '…'
    const identifier2 = '…'
    const dueLabel2 = '…'
    const project2 = '…'
    const priority2 = '…'
    const identifier3 = '…'
    const dueLabel3 = '…'
    const project3 = '…'
    const priority3 = '…'
    const length = '…'
    const identifier4 = '…'
    const dueLabel4 = '…'
    const project4 = '…'
    const priority4 = '…'
    const identifier5 = '…'
    const dueLabel5 = '…'
    const project5 = '…'
    const priority5 = '…'
    const identifier6 = '…'
    const dueLabel6 = '…'
    const project6 = '…'
    const priority6 = '…'
    const name = '…'
    const project7 = '…'
    const identifier7 = '…'
    const dueLabel7 = '…'
    const assignees = '…'
    const priority7 = '…'
    const identifier8 = '…'
    const dueLabel8 = '…'
    const assignees2 = '…'
    const priority8 = '…'
    const identifier9 = '…'
    const dueLabel9 = '…'
    const assignees3 = '…'
    const priority9 = '…'
    const project8 = '…'
    const identifier10 = '…'
    const dueLabel10 = '…'
    const assignees4 = '…'
    const priority10 = '…'
    const identifier11 = '…'
    const dueLabel11 = '…'
    const assignees5 = '…'
    const priority11 = '…'
    const identifier12 = '…'
    const dueLabel12 = '…'
    const assignees6 = '…'
    const priority12 = '…'
    const project9 = '…'
    const identifier13 = '…'
    const dueLabel13 = '…'
    const assignees7 = '…'
    const priority13 = '…'
    const identifier14 = '…'
    const dueLabel14 = '…'
    const assignees8 = '…'
    const priority14 = '…'
    const identifier15 = '…'
    const dueLabel15 = '…'
    const assignees9 = '…'
    const priority15 = '…'
    const length2 = '…'
    const name2 = '…'
    const project10 = '…'
    const identifier16 = '…'
    const dueLabel16 = '…'
    const assignees10 = '…'
    const priority16 = '…'
    const identifier17 = '…'
    const dueLabel17 = '…'
    const assignees11 = '…'
    const priority17 = '…'
    const identifier18 = '…'
    const dueLabel18 = '…'
    const assignees12 = '…'
    const priority18 = '…'
    const project11 = '…'
    const identifier19 = '…'
    const dueLabel19 = '…'
    const assignees13 = '…'
    const priority19 = '…'
    const identifier20 = '…'
    const dueLabel20 = '…'
    const assignees14 = '…'
    const priority20 = '…'
    const identifier21 = '…'
    const dueLabel21 = '…'
    const assignees15 = '…'
    const priority21 = '…'
    const project12 = '…'
    const identifier22 = '…'
    const dueLabel22 = '…'
    const assignees16 = '…'
    const priority22 = '…'
    const identifier23 = '…'
    const dueLabel23 = '…'
    const assignees17 = '…'
    const priority23 = '…'
    const identifier24 = '…'
    const dueLabel24 = '…'
    const assignees18 = '…'
    const priority24 = '…'
    return (
      <Box flexDirection="column" gap={1}>
        <Box flexDirection="row" justifyContent="space-between">
          <Text dimColor>
            loading…
            {" · demo data"}
          </Text>
          <Button label="Refresh" hotkey="r" autoFocus />
        </Box>
        <Box flexDirection="row" flexWrap="wrap" columnGap={2} borderStyle="round" borderColor="#808080" paddingX={1}>
          <Select label="Who" value={`${assignee}`} options={[{"value":"all","label":"Anyone"},{"label":"‹option›"},{"value":"nobody","label":"Unassigned"}]} />
          <Select label="Project" value={`${project}`} options={[{"label":"‹option›"},{"label":"‹option›"}]} />
          <Select label="Priority" value={`${priority}`} options={[{"value":"all","label":"Any"},{"value":"5","label":"P5 only"},{"value":"4","label":"P4 and up"},{"value":"3","label":"P3 and up"},{"value":"2","label":"P2 and up"},{"value":"1","label":"P1 and up"},{"value":"unset","label":"Not set"}]} />
          <Box flexDirection="row" alignItems="center">
            <Text dimColor>
              {"Blocked "}
            </Text>
            <Button label="Show" variant="secondary" />
            <Button label="Hide" variant="primary" />
          </Box>
          <Box flexDirection="row" alignItems="center">
            <Text dimColor>
              {"Due "}
            </Text>
            <Button label={`${label}`} variant="primary" />
            <Button label={`${label}`} variant="primary" />
            <Button label={`${label}`} variant="primary" />
          </Box>
          <Button plain label="Clear" />
        </Box>
        <Text bold color="red">
          {error}
        </Text>
        <Box flexDirection="row" flexWrap="wrap" columnGap={2} paddingX={1}>
          <Input label="Find #" placeholder="card number" value={`${query}`} submitLabel="find" />
          <Button plain label="Clear" />
        </Box>
        <Box flexDirection="column" borderStyle="round" borderColor="#808080" paddingX={1}>
          <Box flexDirection="row" gap={1}>
            <Text bold>
              FOUND #
              {query}
            </Text>
            <Text dimColor>
              looking…
            </Text>
          </Box>
          <Text color="#e5484d">
            {error2}
          </Text>
          <Text dimColor>
            No task has that number.
          </Text>
          <Box flexDirection="row" gap={1}>
            <Box width={4} flexShrink={0}>
              <Text color="cyan">
                {identifier}
              </Text>
            </Box>
            <Box flexShrink={1} overflow="hidden">
              <Button plain label={`✓ ${title}`} />
            </Box>
            <Box flexGrow={1} />
            <Text color="#e5484d">
              {dueLabel}
            </Text>
            <Text dimColor>
              {project}
            </Text>
            <Text bold color="#ffffff">
              {` ${label} `}
            </Text>
            <Box width={4} flexShrink={0} justifyContent="center">
              <Text bold color="#ffffff">
                P
                {priority}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Box width={4} flexShrink={0}>
              <Text color="cyan">
                {identifier2}
              </Text>
            </Box>
            <Box flexShrink={1} overflow="hidden">
              <Button plain label={`✓ ${title}`} />
            </Box>
            <Box flexGrow={1} />
            <Text color="#e5484d">
              {dueLabel2}
            </Text>
            <Text dimColor>
              {project2}
            </Text>
            <Text bold color="#ffffff">
              {` ${label} `}
            </Text>
            <Box width={4} flexShrink={0} justifyContent="center">
              <Text bold color="#ffffff">
                P
                {priority2}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Box width={4} flexShrink={0}>
              <Text color="cyan">
                {identifier3}
              </Text>
            </Box>
            <Box flexShrink={1} overflow="hidden">
              <Button plain label={`✓ ${title}`} />
            </Box>
            <Box flexGrow={1} />
            <Text color="#e5484d">
              {dueLabel3}
            </Text>
            <Text dimColor>
              {project3}
            </Text>
            <Text bold color="#ffffff">
              {` ${label} `}
            </Text>
            <Box width={4} flexShrink={0} justifyContent="center">
              <Text bold color="#ffffff">
                P
                {priority3}
              </Text>
            </Box>
          </Box>
        </Box>
        <Box flexDirection="column" borderStyle="round" borderColor="cyan" paddingX={1}>
          <Box flexDirection="row" gap={1}>
            <Text bold color="cyan">
              THIS SESSION
            </Text>
            <Text dimColor>
              {length}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Box width={4} flexShrink={0}>
              <Text color="cyan">
                {identifier4}
              </Text>
            </Box>
            <Box flexShrink={1} overflow="hidden">
              <Button plain label={`✓ ${title}`} />
            </Box>
            <Box flexGrow={1} />
            <Text color="#e5484d">
              {dueLabel4}
            </Text>
            <Text dimColor>
              {project4}
            </Text>
            <Text bold color="#ffffff">
              {` ${label} `}
            </Text>
            <Box width={4} flexShrink={0} justifyContent="center">
              <Text bold color="#ffffff">
                P
                {priority4}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Box width={4} flexShrink={0}>
              <Text color="cyan">
                {identifier5}
              </Text>
            </Box>
            <Box flexShrink={1} overflow="hidden">
              <Button plain label={`✓ ${title}`} />
            </Box>
            <Box flexGrow={1} />
            <Text color="#e5484d">
              {dueLabel5}
            </Text>
            <Text dimColor>
              {project5}
            </Text>
            <Text bold color="#ffffff">
              {` ${label} `}
            </Text>
            <Box width={4} flexShrink={0} justifyContent="center">
              <Text bold color="#ffffff">
                P
                {priority5}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Box width={4} flexShrink={0}>
              <Text color="cyan">
                {identifier6}
              </Text>
            </Box>
            <Box flexShrink={1} overflow="hidden">
              <Button plain label={`✓ ${title}`} />
            </Box>
            <Box flexGrow={1} />
            <Text color="#e5484d">
              {dueLabel6}
            </Text>
            <Text dimColor>
              {project6}
            </Text>
            <Text bold color="#ffffff">
              {` ${label} `}
            </Text>
            <Box width={4} flexShrink={0} justifyContent="center">
              <Text bold color="#ffffff">
                P
                {priority6}
              </Text>
            </Box>
          </Box>
        </Box>
        <Box flexDirection="column" borderStyle="round" borderColor="#2f9e5b" paddingX={1}>
          <Box flexDirection="row" gap={1}>
            <Text bold color="#2f9e5b">
              {name}
            </Text>
            <Text dimColor>
              {`${length}`}
            </Text>
          </Box>
          <Text dimColor>
            Nothing here.
          </Text>
          <Box flexDirection="column" marginTop={1}>
            <Text dimColor italic>
              {project7}
            </Text>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier7}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel7}
              </Text>
              <Text dimColor>
                {assignees}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority7}
                </Text>
              </Box>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier8}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel8}
              </Text>
              <Text dimColor>
                {assignees2}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority8}
                </Text>
              </Box>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier9}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel9}
              </Text>
              <Text dimColor>
                {assignees3}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority9}
                </Text>
              </Box>
            </Box>
          </Box>
          <Box flexDirection="column" marginTop={1}>
            <Text dimColor italic>
              {project8}
            </Text>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier10}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel10}
              </Text>
              <Text dimColor>
                {assignees4}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority10}
                </Text>
              </Box>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier11}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel11}
              </Text>
              <Text dimColor>
                {assignees5}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority11}
                </Text>
              </Box>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier12}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel12}
              </Text>
              <Text dimColor>
                {assignees6}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority12}
                </Text>
              </Box>
            </Box>
          </Box>
          <Box flexDirection="column" marginTop={1}>
            <Text dimColor italic>
              {project9}
            </Text>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier13}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel13}
              </Text>
              <Text dimColor>
                {assignees7}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority13}
                </Text>
              </Box>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier14}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel14}
              </Text>
              <Text dimColor>
                {assignees8}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority14}
                </Text>
              </Box>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier15}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel15}
              </Text>
              <Text dimColor>
                {assignees9}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority15}
                </Text>
              </Box>
            </Box>
          </Box>
          <Box marginTop={1}>
            <Text dimColor>
              {length2}
              {" more not shown. Narrow them with the filters."}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column" borderStyle="round" borderColor="#e0a800" paddingX={1}>
          <Box flexDirection="row" gap={1}>
            <Text bold color="#e0a800">
              {name2}
            </Text>
            <Text dimColor>
              {`${length}`}
            </Text>
          </Box>
          <Text dimColor>
            Nothing here.
          </Text>
          <Box flexDirection="column" marginTop={1}>
            <Text dimColor italic>
              {project10}
            </Text>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier16}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel16}
              </Text>
              <Text dimColor>
                {assignees10}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority16}
                </Text>
              </Box>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier17}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel17}
              </Text>
              <Text dimColor>
                {assignees11}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority17}
                </Text>
              </Box>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier18}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel18}
              </Text>
              <Text dimColor>
                {assignees12}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority18}
                </Text>
              </Box>
            </Box>
          </Box>
          <Box flexDirection="column" marginTop={1}>
            <Text dimColor italic>
              {project11}
            </Text>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier19}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel19}
              </Text>
              <Text dimColor>
                {assignees13}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority19}
                </Text>
              </Box>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier20}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel20}
              </Text>
              <Text dimColor>
                {assignees14}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority20}
                </Text>
              </Box>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier21}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel21}
              </Text>
              <Text dimColor>
                {assignees15}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority21}
                </Text>
              </Box>
            </Box>
          </Box>
          <Box flexDirection="column" marginTop={1}>
            <Text dimColor italic>
              {project12}
            </Text>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier22}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel22}
              </Text>
              <Text dimColor>
                {assignees16}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority22}
                </Text>
              </Box>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier23}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel23}
              </Text>
              <Text dimColor>
                {assignees17}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority23}
                </Text>
              </Box>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Box width={4} flexShrink={0}>
                <Text color="cyan">
                  {identifier24}
                </Text>
              </Box>
              <Box flexShrink={1} overflow="hidden">
                <Button plain label={`✓ ${title}`} />
              </Box>
              <Box flexGrow={1} />
              <Text color="#e5484d">
                {dueLabel24}
              </Text>
              <Text dimColor>
                {assignees18}
              </Text>
              <Text bold color="#ffffff">
                {` ${label} `}
              </Text>
              <Box width={4} flexShrink={0} justifyContent="center">
                <Text bold color="#ffffff">
                  P
                  {priority24}
                </Text>
              </Box>
            </Box>
          </Box>
          <Box marginTop={1} />
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const length = '…'
    const identifier = '…'
    const url = '…'
    await $.ui.status(`Vikunja ${length} doing · ${length} blocked`)
    await $.ui.toast(`Vikunja ${identifier} updated`)
    await $.ui.toast(`Demo: this would open ${url}`)
    return next(e)
  })
}

Mod 自身のコード

Mod のライセンス(MIT)に従って載せています。全文は下にあります。写すときは著作権表示を残してください。

hooks/register.tsx 806〜965 行 · ペイン
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const table = $.ui.resolve(e)
    const { Box, Button, Markdown, Text } = table
    const now = await read($, board)
    const shown = await read($, openId)
    const detail = shown === 0 ? null : await read($, selected)
    const open = detail !== null && detail.task.id === shown ? detail : null
    const start = { ...NO_LAUNCH, ...(await read($, launch)) }
    const columns = Math.max(30, e.props.bodyColumns ?? e.viewport?.columns ?? 80)
    const touched = new Set(now.touched.map(t => t.id))
    const doing = new Set(now.doing.map(t => t.id))
    const blocked = new Set(now.blocked.map(t => t.id))

    // The desktop draws the focus ring outside its button, and the pane's edge
    // clips it; the top row keeps a cell clear of the edge so the ring fits.
    const ringRoom = e.surface === 'terminal' ? {} : { paddingX: 1, paddingTop: 1 }

    const isDemoShown = await read($, demo)
    const laneOf = (t: Task) =>
      t.isDone ? 'done' : doing.has(t.id) ? 'doing' : blocked.has(t.id) ? 'blocked' : 'to-do'

    // A filled chip: the fill says which level or lane, the label which one.
    const pill = (label: string, fill: string | undefined) => (
      <Text bold backgroundColor={fill} color={INK[fill ?? ''] ?? LIGHT_INK}>
        {` ${label} `}
      </Text>
    )

    // A priority's chip: the fill is a box of one fixed width with the label
    // centred in it, so P1 and P4 take the same room whatever the font.
    const priorityPill = (priority: number) => (
      <Box width={4} flexShrink={0} justifyContent="center" backgroundColor={PRIORITY_COLOR[priority]}>
        <Text bold color={INK[PRIORITY_COLOR[priority]] ?? LIGHT_INK}>
          P{priority}
        </Text>
      </Box>
    )

    if (open !== null) {
      const t = open.task
      const lane = laneOf(t)

      return (
        <Box flexDirection="column" gap={1}>
          <Box flexDirection="row" justifyContent="space-between" {...ringRoom}>
            <Button
              key="back"
              label="‹ All tasks"
              hotkey="b"
              autoFocus
              onPress={async () => {
                await update($, openId, () => 0)
                void keepFocus($, 'refresh')
              }}
            />
            <Box flexDirection="row" gap={1}>
              <Button key="reload" label="Refresh" hotkey="r" onPress={() => void loadDetail($, t)} />
              {/^https?:\/\//.test(config.webUrl) && (
                <Button
                  key="open"
                  label="Open in Vikunja ↗"
                  hotkey="o"
                  onPress={() => void openInBrowser($, `${config.webUrl}/tasks/${t.id}`)}
                />
              )}
            </Box>
          </Box>

          <Box flexDirection="column">
            <Text dimColor>
              {[t.project, t.identifier].filter(Boolean).join(' · ')}
            </Text>
            <Text bold>{t.title}</Text>
            <Box flexDirection="row" gap={1}>
              {pill(lane.toUpperCase(), LANE_COLOR[lane])}
              {t.priority > 0 && priorityPill(t.priority)}
              {t.assignees.length > 0 && <Text dimColor>{t.assignees.join(', ')}</Text>}
              {t.dueAt > 0 && (
                <Text color={t.dueAt < now.fetchedAt && !t.isDone ? '#e5484d' : undefined} dimColor={t.dueAt >= now.fetchedAt || t.isDone}>
                  due {dueLabel(t.dueAt)}
                </Text>
              )}
            </Box>
            <Text dimColor>
              {open.isLoading
                ? 'loading…'
                : `updated ${open.updated} · live, checked every ${LIVE_MS / 1000}s`}
            </Text>
          </Box>

          <Box flexDirection="column">
            <Text bold dimColor>
              SESSION
            </Text>
            {config.folderRoot === '' ? (
              <Text dimColor>Set folderRoot in this plugin's options to give tasks a folder.</Text>
            ) : 'Select' in table ? (
              <Box flexDirection="row" flexWrap="wrap" columnGap={2}>
                <table.Select
                  key="folder"
                  label="Folder"
                  value={start.isTyping ? OTHER : t.folder}
                  options={[
                    { value: '', label: 'Not set' },
                    ...[...new Set([t.folder, ...start.folders].filter(Boolean))].slice(0, CHOICES + 1).map(value => ({ value })),
                    { value: OTHER, label: 'Another or new folder…' },
                  ]}
                  onSelect={value =>
                    value === OTHER
                      ? void update($, launch, was => ({ ...NO_LAUNCH, ...was, isTyping: true, note: '' }))
                      : void setFolder($, t, value)
                  }
                />
                {t.folder !== '' && (
                  <Button
                    key="start-session"
                    variant="primary"
                    label="Start session"
                    onPress={() => void startSession($, open)}
                  />
                )}
              </Box>
            ) : (
              <Text dimColor>{t.folder === '' ? 'No folder set.' : t.folder}</Text>
            )}
            {start.isTyping && 'Input' in table && (
              <table.Input
                key="folder-path"
                label={`Folder name  ${config.folderRoot}`}
                placeholder="project-name"
                submitLabel="use or create"
                onSubmit={value => void createFolder($, t, value)}
              />
            )}
            {t.folder === '' && !start.isTyping && (
              <Text dimColor>Pick the folder this task is worked on in to start a session there.</Text>
            )}
            {start.note !== '' && <Text>{start.note}</Text>}
          </Box>


          <Box flexDirection="column">
            <Text bold dimColor>
              DESCRIPTION
            </Text>
            {!open.isLoading && open.body.length === 0 && <Text dimColor>None.</Text>}
            {open.body.map(block => (
              <Markdown text={block} />
            ))}
          </Box>

          {open.comments.length > 0 && (
            <Box flexDirection="column" gap={1}>
              <Text bold dimColor>
                COMMENTS · {open.comments.length} · newest first
              </Text>
              {open.comments.map(c => (
                <Box flexDirection="column">
                  <Box flexDirection="row" gap={1}>
                    <Text bold>{c.author}</Text>
ライセンスの全文(MIT)
MIT License

Copyright (c) 2026 Tim Moore

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.

コードが呼ぶもの

通信プログラム起動ファイル書き込み環境変数ツール呼び出し

コードから読み取ったデザイン

読み取ったコミットのソースから描いたもので、動かした結果ではありません。一覧は 3 回描き、条件はデスクトップアプリで描く最初の分岐を取り、動かしたときにだけ決まる値は仮の例(点線の下線)にするか省きます。色と書体はこのサイトのものです。

コードから読めること

2026-10-06 に読んだコミット a7a8630b8cb5 のソースから。最初のまとまりが載せる条件で、残りは自分で判断するための材料です。後のコミットは、次に読むまで見ていません。

載せる条件: 確かめやすいコード
入口を読んだhooks/hooks.json が名指すモジュールをすべて読んだ。hooks/register.tsx
解析できるすべてのファイルが TypeScript か JavaScript として解析できる。2 ファイルを解析
コードが Mod の中で完結import は Mod 自身のファイルかエンジンのモジュールだけ。パッケージも require もない。コードはすべて Mod の中
読める圧縮した行・eval・new Function・計算した道の import()・符号化した塊がない。圧縮・eval・符号化した塊なし
呼び出しが見える通信とプログラム起動はその場で $.http.fetch・$.process.run と書き、他へ渡さない。外への呼び出しはすべてその場の $ で
入れる前に自分で判断する材料
描く場所コードから読んだ、描く先。ターミナル・デスクトップアプリ・両方・何も描かない(フックだけ: 見張りやプロンプトの書き換え)のどれか。出すだけで、外す理由にはしない。ターミナルとデスクトップアプリに同じように描く
入れる手順リポジトリ自身の .claude-plugin/marketplace.json にこの Mod が載っていて、ページに書いた手順でそのマーケットプレイスから入れられるか。リポジトリの .claude-plugin/marketplace.json に載っておらず、入れる手順は出せない
Windows のプログラム$.process で起動するプログラムが Windows にあるか(tail・date・open・osascript・/usr/… などは無い)。Windows にないプログラムを使わない
通信fetch の送り先(https のホスト)がコードに書いてあるか。hooks/register.tsx:160 fetch(base + path)
プログラム起動するプログラムの名前がコードに書いてあり、シェル・インタプリタ・通信用の道具でないか。hooks/register.tsx:692 実行時に決まるプログラム
読んで送るファイルや環境変数を読み、かつ通信するか。reads environment variables and files and reaches the network
ソースの鍵ソースに API キーや秘密鍵らしきものがあるか。ソースに鍵なし
ライセンスオープンなライセンス(MIT・Apache-2.0・BSD・ISC・Unlicense・0BSD・CC0)で全文があれば、modscode にコードを載せる。違えばリンクだけ。MIT

コードの文面を読んだだけで、安全の審査ではありません。動かしてはおらず、起動するプログラムの中で何が起きるかも見えません。入れる前の確認はあなたの役目です。 載せる条件

入れる

入れる前に、必ず自分で確かめてください。Mod はサンドボックスなしで、あなたの権限で動きます。modscode はこのコードの安全を保証しません。下のコードを読み(またはフォルダーで claude plugin validate .)、触るものを見て、読んだコミットを入れてください。

リポジトリの .claude-plugin/marketplace.json にこの Mod が載っていないため、入れる手順は出せません。コードとして読むか、作者の README に従ってください。

Claude に聞く

modscode のコネクタを入れると、Claude がこのデザイン・コードが触るもの・コードを読んで、それをもとに作れます。たとえば:

modscode のデザイン「angusmaul-vikunja-tasks」をコードごと読んで、同じようなペインを作って

Claude から探す: MCP コネクタ

似たデザイン