Skip to content

docs(notify): record why Approve is on the right - #54

Merged
chaodu-agent merged 1 commit into
mainfrom
docs/approve-right-rationale
Nov 29, 2026
Merged

chaodu-agent merged 1 commit into
mainfrom
docs/approve-right-rationale

Conversation

@chaodu-agent

Copy link
Copy Markdown
Contributor

Follow-up to #53, which merged before this doc commit was pushed.

Records the owner decision (2026-11-28) behind the Telegram button order in docs/design/muse-gated-passthrough.md 3.6.2: Approve on the right is easier to reach with the right thumb on a phone. Also notes that the web approval page is unchanged (Approve first, stacked on narrow screens). Docs only, no code change.

@chaodu-agent

Copy link
Copy Markdown
Contributor Author

Note

LGTM ✅ - Docs-only follow-up to #53; the recorded rationale and the unchanged web-page note both match the code.

What This PR Does

PR #53 moved the Telegram buttons to Deny | Approve but merged before the doc commit landed. This PR records why in docs/design/muse-gated-passthrough.md section 3.6.2 (owner decision, 2026-11-28: Approve on the right is easier to reach with the right thumb on a phone) and notes that the web approval page is unchanged.

How It Works

One paragraph in the "The message" bullet of section 3.6.2 is extended (+4/-2). No code, config, or test changes.

Findings

# Severity Finding Location
1 🟢 Telegram order claim matches the code: the inline keyboard sends Deny then Approve crates/ap-proxy/src/notify.rs:228-230
2 🟢 Web page claim matches the code: actions render Approve first, one column by default, two columns at min-width:560px crates/ap-proxy/src/approval/page.rs:67, page.rs:546-549
3 🟢 Follows the doc's existing "Owner decision, YYYY-MM-DD" convention and closes the gap left by #53, so the Telegram/web order difference will not be mistaken for a bug docs/design/muse-gated-passthrough.md:534-537
Finding Details

🟢 F1: Telegram order verified

notify.rs builds inline_keyboard: [[{Deny}, {Approve}]], which is what the doc now states.

🟢 F2: Web page behavior verified

page.rs emits the Approve action before Deny. The .actions grid is single-column by default and switches to 1fr 1fr at min-width:560px, so "Approve first, stacked on narrow screens" is accurate.

🟢 F3: Minimal, convention-following change

The smallest viable change is either this +4/-2 edit or no change (relying on #53 history). Recording the rationale in the design doc is the better place, since readers of section 3.6.2 will not read PR history.

Considered, not blocking
  • Easy-to-hit action is the dangerous one. Putting Approve under the thumb makes the irreversible action the easiest press. This is an explicit owner decision, and the same section already documents the mitigations: only a press from owner_chat_id is served, each press must carry the per-hold nonce, and the first valid press decides. An optional follow-up could name this as an accepted trade-off.
  • Telegram vs. wide-screen web order. Telegram is Deny | Approve; the web page at >= 560px is Approve | Deny. The surfaces differ, and this PR documents the difference instead of leaving it implicit. If the web page is revisited later, aligning its wide-screen order is a CSS-only change and out of scope here.
  • Intro wording and line wrap. The section intro still says "two inline buttons, Approve and Deny" (a list of names, not an order claim), and one reflowed line is 114 characters. The doc has many lines over 100 characters, so neither breaks a convention.
Baseline Check
  • PR opened: 2026-11-28
  • Head: defe369b9dd5594947f71b810c60c6bccd23bfc5; base: main; merge base: a63d993 ("feat(notify): Deny on the left, Approve on the right")
  • Diff: 1 file, docs/design/muse-gated-passthrough.md, +4/-2
  • Main already has: the button-order code change from feat(notify): Deny on the left, Approve on the right #53
  • Net-new value: the recorded rationale and the web-page note
What's Good (🟢)
  • Every factual claim in the diff was checked against the implementation and is accurate.
  • Scope is minimal: no new config, abstraction, or code.
  • Security and CI: no impact (docs only). git diff --check passes; the poll-and-review check passes.

Reviewer Verdicts

Reviewer Verdict
Reviewer A (architecture/docs) LGTM, no actionable findings
Reviewer B (correctness) Approve, optional trade-off wording suggested
Reviewer C (simplicity/long-term) Approve, optional nits on intro wording and wrap
Reviewer D (security/CI) No report received
Coordinator baseline LGTM

5. Three Reasons We Might Not Need This PR

  1. No behavior change - the code already shipped in feat(notify): Deny on the left, Approve on the right #53; the PR history records the reason.
  2. Preference-based rationale - right-thumb reach fits the current owner and may not fit other users.
  3. Small doc churn - the note about the unchanged web page could go stale if the page is changed later without updating section 3.6.2.

@chaodu-agent
chaodu-agent merged commit 4b98b42 into main Nov 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant