feat: publish a static demo of the timeline on GitHub Pages - #149
Open
KinjiKawaguchi wants to merge 3 commits into
Open
KinjiKawaguchi wants to merge 3 commits into
KinjiKawaguchi wants to merge 3 commits into
Conversation
KinjiKawaguchi
force-pushed
the
feat/web-timeline-demo
branch
from
August 2, 2026 10:58
a9726c7 to
652912a
Compare
画面の出力はJavaScriptも外部リソースも含まない自己完結したHTMLなので、 静的ホスティングにそのまま置ける。架空の予約を積んだ画面を起動して期間ごとの HTMLを保存する。 期間切り替えのリンクはサーバー上の絶対パスで、配信先がドメイン直下とは限らない 静的ホスティングでは行き先を見失う。ファイル名へ置き換えたうえで、絶対パスが 残っていないことをその場で確かめる。 所有者名には英字の定番名を使い、架空のデータである旨をページ先頭に出す。 公開されるページで実在の利用者と読み違えられないようにするため。 開発中に画面を目で確かめる用途も兼ねるので、tests/preview.rs は役目を終えて削除する。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016uSBf6WpYKseYkhxDLKCLt
画面には現在時刻の目印が入るため、作り直さないと日付が置き去りになる。 mainへの反映時に加えて毎朝更新する。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016uSBf6WpYKseYkhxDLKCLt
READMEと管理者ガイドから、実際の画面を見て判断できるようにする。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016uSBf6WpYKseYkhxDLKCLt
KinjiKawaguchi
force-pushed
the
feat/web-timeline-demo
branch
from
August 2, 2026 11:47
652912a to
3b1f636
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Web タイムラインが実際にどう見えるかを、環境を用意せずに確かめられるようにしたい。研究室メンバーに導入前に見せる、README を読んだ人がひと目で判断する、といった場面で効きます。
Topcoat は今回リアクティビティを一切使っていないため、画面の出力は JavaScript ゼロ・外部リソースゼロの自己完結した HTML(36KB、Tailwind CSS インライン込み)です。静的ホスティングにそのまま置けます。
Note
このPRは #140 をベースにしています。#140 がマージされれば自動で main ベースに切り替わります。
What
examples/demo_page.rs— 架空の予約を積んだ画面を起動し、期間ごとの HTML を書き出す.github/workflows/demo-page.yml— main への反映時と毎朝 6:00 (JST) に生成して Pages へ配信tests/preview.rsは開発中の目視確認用でしたが、cargo run --example demo_pageが同じ役割を果たすので削除しました。How
リンクの書き換えが必要でした。 期間切り替えは
href="/?days=7"というサーバー上の絶対パスを出します。kano-lab.github.io/lab-resource-manager/のようなサブパス配信では/がドメインルートを指して壊れるため、7days.html等へ置き換えています。本番コードには手を入れず、生成側で完結させました。置き換えは属性ごと行っています。
/?days=3だけを狙うと/?days=30の先頭にも当たり、30日表示へのリンクが3days.html0に化けるためです(実際に踏みました)。生成時に絶対パスが残っていないことを assert で確かめています。公開ページに出る名前に配慮しました。 所有者は
alice/bob/carol… の英字定番名にし、リソース名もAurora/Borealisという架空のものに変えています。ページ先頭には架空データである旨の断り書きを常時表示します。実在の研究室メンバーの予約と読み違えられないようにするためです。毎朝作り直します。 画面には現在時刻を示す赤い縦線が入ります。データは生成時刻からの相対で作っているので、再生成するだけで「今日」に追従します。
デモに含めた状況
画面の挙動が一通り分かるよう、次を含めています。
マージ前に必要な設定
リポジトリ設定で GitHub Pages を有効にする必要があります(Settings → Pages → Source を "GitHub Actions" に)。これを行わないと
deployジョブが失敗します。🤖 Generated with Claude Code
https://claude.ai/code/session_016uSBf6WpYKseYkhxDLKCLt