Skip to content

feat: Live Demo、投票模擬模式、英文 README、安全說明、Node 20 - #4

Merged
keanu77 merged 1 commit into
mainfrom
feat/live-demo
Oct 18, 2026
Merged

keanu77 merged 1 commit into
mainfrom
feat/live-demo

Conversation

@keanu77

@keanu77 keanu77 commented Oct 18, 2026

Copy link
Copy Markdown
Owner

回應「讓陌生人 30 秒看懂、5 分鐘成功體驗」的五項建議。

內容

  1. Live Demo:demo/src/index.html → docs/index.html(279 KB 單檔),合併後開 GitHub Pages(main /docs)即上線 https://keanu77.github.io/htmlpptskill/。12 頁:快捷鍵、fragment 流程、Auto-Animate、3D 翻卡、頁內測驗、手機投票與猜數字(模擬 60 人)、滑桿對比、安裝 QR。
  2. Demo GIF:docs/demo.gif(45 秒:一句話 → Demo 操作 → QA → HTML/PDF/PPTX)放在 README 開頭。
  3. 英文 README:README.en.md,含安裝、需求、10 分鐘上手、投票、限制、疑難排解。
  4. 乾淨環境安裝測試:OrbStack Ubuntu 24.04 照 README 全程。第一輪發現 Ubuntu apt 的 Node 18 跑不了 Playwright(README 原寫 Node 18+);改 Node 20+ 後全部通過。需求、install.sh 檢查、engines、疑難排解已更新。
  5. 安全說明:SECURITY.md(私下回報、ADMIN_KEY 只放講者電腦與輪替方式、QA 會執行 JS、不自動部署)。v1.3.0 Release 已於先前發布。

另:poll-slides.mjs --polls <file> --sim [N] 模擬模式(不連後端、不含 key);build-handout.mjs 缺 meta.json 時給明確錯誤。

測試

  • Live Demo:QA_OFFLINE=1 qa-screenshots 通過(12 頁、無溢出、無 JS 錯誤、QR 相符、對外請求 0)
  • Demo 互動:測驗作答、模擬投票 60 人、A 揭曉、Shift+R 重來、無對外請求;手機寬度自動進捲動模式
  • Demo 的 print-pdf(12 頁)、render-slides+build-handout(12 頁含備註)
  • 乾淨 Ubuntu 24.04+Node 20:clone → install.sh → venv → playwright → inline-assets → QA → render → handout → PDF → 做法 B npm run all 全數 rc=0
  • CI

🤖 Generated with Claude Code

- demo/:12 頁 Live Demo 原始檔與 build → docs/index.html(逐步出現、Auto-Animate、翻卡、測驗、模擬投票、滑桿)
- poll-slides.mjs --polls --sim:不連後端、不含 key 的模擬模式,可公開
- README.en.md、SECURITY.md;README 開頭放 Live Demo 與 45 秒流程 GIF
- 乾淨 Ubuntu 24.04 安裝測試:Node 18 跑不了 Playwright,需求改 Node 20+
- build-handout 缺 meta.json 時給明確錯誤;CI 檢查 Live Demo 為模擬模式且不含 key

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T15:06:24.820897Z d3e2926 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d3e2926bc3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.en.md
Comment on lines +106 to +108
cp -R $SKILL/references/live-poll/worker my-poll && cd my-poll && npm install
npx wrangler login && npx wrangler secret put ADMIN_KEY && npx wrangler deploy # put the same key in .dev.vars
node $SKILL/scripts/poll-slides.mjs index.html index-live.html --worker my-poll --url https://slide-poll.<subdomain>.workers.dev

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Return to the deck directory before generating polling slides

When a reader runs this new English setup block in one shell session, the first command leaves the shell inside my-poll, so the final command looks for the deck as my-poll/index.html and resolves --worker my-poll as a nonexistent nested directory. End the deployment command in a subshell or cd .. before invoking poll-slides.mjs so the documented workflow can generate the presenter deck.

Useful? React with 👍 / 👎.

Comment thread demo/src/index.html

<span class="c"># 重開 CLI 後直接說</span>
「做一份 HTML 簡報」</div>
<div class="note">支援 <b>Claude Code、Codex CLI、Gemini CLI、Grok Build</b>。需要 Node 18+;QA 用 Playwright,講義用 Python。</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Advertise the actual Node 20 minimum in the demo

The commit raises the project requirement to Node 20 because the supported Playwright version does not run on Node 18, but the installation slide still tells viewers that Node 18+ is sufficient. Users following the live demo can therefore install an unsupported runtime and fail at QA; this source text and its generated docs/index.html output should say Node 20+.

Useful? React with 👍 / 👎.

Comment on lines +41 to +45
function simStart(id) {
const def = CFG.polls[id];
if (sims[id]) return render(id);
sims[id] = { votes: [], timer: null };
$$('.lp-phones').forEach(el => { el.textContent = SIM; });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Seed the simulated join-slide count at startup

When a simulated deck includes the recommended <section data-poll-join>, opening on that slide leaves its phone count at 0: onShow only calls simStart for sections with data-poll, while this is the sole place that assigns SIM to .lp-phones. The join slide will not show the configured simulated audience until the presenter visits a question and navigates back, so initialize the count when simulation mode starts.

Useful? React with 👍 / 👎.

@keanu77
keanu77 merged commit 9ffe463 into main Oct 18, 2026
2 checks passed
keanu77 added a commit that referenced this pull request Oct 19, 2026
* fix: 處理 PR #3/#4 的 Codex 審查意見

- 中位數偶數筆取中間兩筆平均(worker 抽出 stats.js 並加測試;模擬模式同步)
- 投影片端換頁競態:控制請求排隊、換頁序號擋掉過期的開題
- 手機頁重連:取消排定的重連、已在連線就不再開新 socket
- 模擬模式啟動即設定加入頁人數
- qrcode 改為 skill 自帶套件(resolve.mjs SKILL_LOCAL)
- README 部署指令改用子 shell;live-poll README 補 cd ..
- Live Demo 改為 Node 20+,重新 build docs/index.html
- CI 執行 worker 的 node --test

* fix: 控制請求排隊時略過過期的換頁指令

斷線時 /api/control 卡住、講者連換多頁,積壓的換頁指令輪到時若已換過頁就略過,
只送最新狀態;不會重播舊題、也不會疊加多次逾時。揭曉/清空照送。
重新 build docs/index.html。

---------

Co-authored-by: keanu77 <20503845+keanu77@users.noreply.github.com>
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