본문으로 건너뛰기
cccskills
무료GitHub에 공개

formax-approval-ui-workflow

Use when adding or changing any Approval prompt/presenter.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

formax-approval-ui-workflow

Goal

  • Keep Approval prompts visually consistent + Claude Code-aligned (only when explicitly requested).
  • Preserve existing behavior + keyboard flow (Enter/Esc/Shift+Tab), avoid UI regressions.
  • Keep preview rendering fast and safe (no sync IO in render; guard against quadratic diffs).

Where to change what

  • Shared approval “chrome”
    • packages/core/src/components/ui/ApprovalHeader.tsx (top divider + title color)
    • packages/core/src/components/ui/ConfirmMenu.tsx (numbered options + selection color)
  • Preview (optional section under header)
    • packages/core/src/components/tool/ApprovalPreview.tsx (simple file preview)
    • packages/core/src/components/tool/PatchApprovalPreview.tsx (edit-file wrapper: header + file + preview)
    • packages/core/src/components/tool/PatchPreview.tsx (diff rendering + performance guards)
  • Per-tool approval prompts (labels, options, allow/ask/deny / remember write paths)
    • packages/core/src/components/tool/bashApprovalPrompt.tsx
    • packages/core/src/components/tool/fsReadApprovalPrompt.tsx
    • packages/core/src/components/tool/fsWriteApprovalPrompt.tsx
    • packages/core/src/components/tool/skillApprovalPrompt.tsx
    • (if present) packages/core/src/components/tool/editApprovalPrompt.tsx (legacy)
  • Tool presenters that mount approval prompts
    • packages/core/src/tools/modules/bash/presenter.tsx
    • packages/core/src/tools/modules/read/presenter.tsx
    • packages/core/src/tools/modules/write/presenter.tsx
    • packages/core/src/tools/modules/edit/presenter.tsx
    • packages/core/src/tools/modules/skill/presenter.tsx
  • Colors / theme
    • packages/core/src/tui/theme.ts (theme.permission, theme.text, theme.diff.*)

Patterns

  • Layout skeleton (keep consistent)

    • [Top divider line]
    • Title (color = theme.permission)
    • Optional Preview box
    • Question line (e.g. “Do you want to … <file>?”)
    • Options list (numbered)
    • Bottom hint (e.g. “Esc to cancel”)
  • Options rendering (text + emphasis)

    • If an option needs mixed styling (e.g. make capture-terminal/ bold/white): make ConfirmMenu accept ReactNode labels.
    • Ensure selection color wins over nested Text color={...} when highlighted:
      • Prefer passing “unstyled” children and let row wrapper decide color, or
      • In nested text, only set bold, avoid hardcoding color unless required.
  • Preview performance (must not block UI)

    • No fs.readFileSync/fs.statSync/blocking IO inside render path (useMemo included).
    • If file context is needed (e.g. line numbers), compute via async fs/promises + useEffect.
  • Diff safety (avoid OOM / hangs)

    • Any token/word diff based on DP/LCS must have a hard cap (max cells).
    • If cap exceeded: fall back to truncated / line-only / “too large to diff” preview.

Tests to update

  • Unit/component tests (minimum regression set):

    • packages/core/src/components/ui/ConfirmMenu.test.tsx (ReactNode label + selection color)
    • packages/core/src/components/tool/bashApprovalPrompt.test.tsx (if exists)
    • packages/core/src/components/tool/fsReadApprovalPrompt.test.tsx (if exists)
    • packages/core/src/components/tool/fsWriteApprovalPrompt.test.tsx (if exists)
    • packages/core/src/components/tool/skillApprovalPrompt.test.tsx (if exists)
    • packages/core/src/tools/modules/edit/presenter.test.tsx (preview/diff layout + performance guard)
  • Manual spot-check (fast)

    • Trigger one approval for each kind: Bash, Read(outside workspace), Write, Edit.
    • Verify: top divider, title color, option numbering, selection color, Esc behavior.

Guardrails

  • Do not change UI copy/spacing/colors unless explicitly requested for Claude Code parity.
  • Treat UI output vs model context injection as orthogonal; don’t change injection behavior as a side-effect of approval UI work.
  • Do not add a syntax highlighting library (keep preview rendering lightweight).
  • Do not broaden scope (“refactor approval system”); only touch what the prompt requires.
  • Keep rendering responsive:
    • no sync IO in render
    • hard caps for quadratic diff algorithms
  • Loop discipline:
    • run targeted tests first, then bun run test if needed
    • run review before committing using AGENTS.md -> Review Profile (Single Source of Truth); fix all high/medium findings

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when a Formax repository task is non-trivial and you should analyze goals, non-goals, boundaries, data/type/interface impact, contract impact, test strategy, and whether an xhigh subagent is actually needed before writing a todo or code.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

yusifeng/formax1942026년 7월 25일 업데이트

Use when implementing or extending /config (storage, prompt injection, request params, UI-only toggles) with tests and strict UI parity.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

yusifeng/formax1942026년 7월 25일 업데이트

Use when working on Formax code changes and you need a disciplined dev loop: keep a single mainline task, avoid scope drift, run only targeted tests (no coverage), avoid partial staging (MM), run mandatory review before commit, include an incremental optimization check, and keep commits small and reviewable.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

yusifeng/formax1942026년 7월 25일 업데이트

Use when implementing/debugging Ctrl+O Expanded Transcript (second view) and thinking persistence in the REPL.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

yusifeng/formax1942026년 7월 25일 업데이트

Use when implementing or debugging Formax permissions/policy/approval behavior and UI (allow/ask/deny rules, workspace boundaries, approval prompts, and /permissions overlay parity with Claude Code).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

yusifeng/formax1942026년 7월 25일 업데이트

Use when preparing a Formax code handoff: selecting files, generating repomix bundles, and writing a high-quality prompt for WebGPT or another coding agent with clear constraints and validation scope.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

yusifeng/formax1942026년 7월 25일 업데이트

yusifeng의 스킬 모두 보기

이 스킬의 문제 신고