Skip to content

feat: add trial history and event rows - #16

Merged
torabit merged 1 commit into
mainfrom
torabit/feat/history
Sep 27, 2026
Merged

torabit merged 1 commit into
mainfrom
torabit/feat/history

Conversation

@torabit

@torabit torabit commented Sep 27, 2026

Copy link
Copy Markdown
Owner

変更内容

src/history.rs を追加した。保持は 30 秒が既定。全入力が離れたら無入力の時間を測る。300ms を既定とする指定時間が経過した時点で、次の入力を待たずに試行を確定し、最後のイベントの時刻を終端として返す。読み出しは進行中の試行を先頭に置き、新しい順に返す。

Trial::rows() は同時刻のイベントを 1 行にまとめる。入力がない区間も残す。その行の held は空になる。押しっぱなしの行は、最新の now_us まで伸びる。

押下が保持期間を超えても試行は区切らない。ロックは持たない。排他は app 側で行う。古いイベントを破棄しながら、最初の押下時刻と進行中の試行を内部状態に残す。

検証

  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test — 60 件成功
  • cargo coupling --check --min-grade=B --max-circular=0 ./src — Grade A、循環 0

Closes #5

Issue: #5

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@torabit torabit mentioned this pull request Sep 27, 2026
@torabit
torabit merged commit 6dde514 into main Sep 27, 2026
1 check 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.

history

2 participants