Skip to content

给上游 op7418/guizang-ppt-skill 提 PR · 修 Style A+B deck lock #6

Description

@raawaa

Parent

#2 (ADR 0001) — the contract this PR implements

What to build

Open a pull request from the fork (raawaa/guizang-ppt-skill) to upstream (op7418/guizang-ppt-skill) on main carrying the Style A + Style B parts of the deck-lock fix. The PR must NOT contain Style C / hongqiao content (Style C is fork-only and doesn't exist upstream).

Branch setup

git fetch upstream
git checkout -b fix/deck-lock-follows-transition upstream/main

Files in the PR (and ONLY these)

The helper snippet:

function deckLockMs() {
  const deckEl = document.getElementById('deck');
  if (!deckEl) return 60;
  const cs = getComputedStyle(deckEl);
  const d = cs.transitionDuration || '0s';
  let max = 0;
  for (const p of d.split(',')) {
    const t = p.trim();
    if (!t) continue;
    if (t.endsWith('ms')) max = Math.max(max, parseFloat(t));
    else if (t.endsWith('s')) max = Math.max(max, parseFloat(t) * 1000);
  }
  return Math.max(60, max);
}

Files explicitly NOT in the PR

  • docs/adr/0001-deck-lock-follows-transition.md — fork-only decision record; rationale goes in PR description instead
  • references/checklist.md — fork self-check; not part of upstream
  • assets/template-hongqiao.html — fork-only Style C
  • examples/虹桥-2026-Q1汇报/index.html — fork-only example
  • references/hongqiao-checklist.md — fork-only Style C checklist
  • references/layouts-hongqiao.md, references/themes-hongqiao.md — fork-only
  • scripts/validate-hongqiao-deck.mjs — fork-only
  • CONTEXT.md — fork-only glossary

PR title

fix(go): align deck lock with #deck transition-duration (60ms floor)

PR description (4 sections, in this order)

  1. Repro — Static mode (B key) → press → rapidly → 1st press eaten, 2nd works. Affects every upstream user.
  2. Root cause — One paragraph: go() has a hardcoded 700ms lock; #deck's CSS transition-duration is 0s in static mode and .9s in motion mode. The two are not aligned.
  3. Fix — Read getComputedStyle(deck).transitionDuration, take the max across comma-separated components, apply a 60ms floor. Why 60ms: blocks keyboard auto-repeat at ~30ms, doesn't block normal human keypress >120ms. Why CSS-driven (not __lowPowerMode-driven): CSS is the single source of truth for transition length; following the JS flag would duplicate config and break if someone customizes the transition.
  4. Evidence — Paste agent-browser before/after logs (a 4-press static-mode test where before shows 2/4 advances and after shows 4/4 advances).

Push & open

git push -u origin fix/deck-lock-follows-transition
gh pr create --repo op7418/guizang-ppt-skill \
  --base main --head raawaa:fix/deck-lock-follows-transition \
  --title "fix(go): align deck lock with #deck transition-duration (60ms floor)" \
  --body-file <above-description>

Acceptance criteria

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions