Skip to content

Restore the v0.2 approval card style for every card #177

Closed

Description

@sudoHG

Goal

Restore the approval card to the v0.2 visual style, which the maintainer prefers, and extend that style to every write card. Keep the safety fixes from #175 that the user cannot see.

Context

  • The maintainer rejected the dense cards from PR Make agent approval cards readable at a glance #175 (merged as 57c614a) after seeing them on a real Mac. The v0.2 read card (the prompt as of 425e29e) is the target. Its layout, top to bottom:
    • a 64-point app icon;
    • a bold one-sentence title with the subject, “Claude Code”想使用“网站服务器”;
    • one subtitle line, 用于运行 ./deploy.sh;
    • a centered 详细信息 › link;
    • the buttons;
    • a small footer, 4:11 后失效 · Esc 稍后处理.
  • Every write card follows the same layout. It is one sentence plus one short subtitle, and everything else lives behind 详细信息.
  • Keep from Make agent approval cards readable at a glance #175: the App-side per-component value digests (Show which components change in a modify approval #174), and the rule that the default button never changes after a cancelled Touch ID (it must never become the 30-minute option). Keep the presentation helpers you need, and delete the rest of the dense card UI.

Executor: Claude · claude-opus-5-5 · xhigh. Display only.

Decisions

The card shows only the title and the subtitle. Use straight-quote style like v0.2: “…”, with “ ” in both languages.

Card Title (zh / en) Subtitle (zh / en) Buttons
Read “{A}”想使用“{C}” / “{A}” wants to use “{C}” 用于运行 {command} / to run {command} (v0.2 behavior, unchanged) 允许本次 · 允许 30 分钟 · 拒绝
Create “{A}”想新建凭证“{C}” 放进新分组“{G}” / 放进“{G}” / no subtitle when ungrouped 新建 · 拒绝
Value-only change “{A}”想替换“{C}”的值 (or 的 {ITEM} when only some items change) 旧值将无法找回 替换 (destructive, not the default) · 拒绝
Other change “{A}”想修改“{C}” what changes, e.g. 更改使用说明和分组, 新增 1 项, 移除 1 项. Add (删掉了部分说明) when instruction text is removed; when an item is removed, add 移除的值将无法找回 修改 · 拒绝; destructive when an item is removed
Delete “{A}”想删除“{C}” 移到回收站,30 天内可恢复 删除 · 拒绝
Organize “{A}”想整理分组 共 N 步; append ,会动到 N 个隐藏的凭证 or ,其中一步会合并分组 when true 执行 · 拒绝; destructive when it merges
  • English mirrors these. Use title case on buttons.

  • Title and subtitle wrap freely. Names are never truncated, and the subtitle has at most 2 lines.

  • After a cancelled Touch ID, keep the same buttons in the same order and add one gray line, 已取消验证,未交出任何内容.

  • 详细信息 holds everything else:

    • the requester-verification note and the agent-stated purpose;
    • the full command and the working directory;
    • what is delivered and how;
    • the 30-minute scope;
    • the instructions with the word-level diff and the removed text;
    • the items with their exact Unchanged / Replaced / New / Removed tags;
    • the group change;
    • every organize step, including no-change steps and merge details;
    • the value reveal (验证后查看).

    The expanded content scrolls inside a capped region, and the buttons stay visible.

  • Card height cap: 640 points.

Scope

May change: Sources/AskKeyAppKit/App/AppDelegate+Approval.swift (only to keep the resized panel inside the screen's visible frame), Sources/AskKeyAppKit/App/FrozenAgentApprovalPrompt.swift and the approval presentation files added or changed by #175, Localizable.xcstrings, App tests, and the approval screenshot scenarios. Delete card code and strings that become unused.

Must not touch: the Broker, Vault, digests (including the #174 per-component digest), decisions and authentication, product identifiers.

Acceptance

swift build
swift test --filter <changed suites>
python3 scripts/check_hygiene.py && python3 scripts/check_module_deps.py
  • Tests assert the title, subtitle and buttons for every row of the table in both languages, and that the default button is unchanged after a cancelled Touch ID.
  • The read card renders as it did at 425e29e.
  • CI build-and-test and basic-ui-flows green; the approval screenshot tests themselves pass.
  • The planner compares offscreen renders against the approved mockups. The maintainer accepts them on device.

Blocked by

None. Blocks #169.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified; an agent may claim it

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions