feat: add trial history and event rows - #16
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Closed
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.
変更内容
src/history.rsを追加した。保持は 30 秒が既定。全入力が離れたら無入力の時間を測る。300ms を既定とする指定時間が経過した時点で、次の入力を待たずに試行を確定し、最後のイベントの時刻を終端として返す。読み出しは進行中の試行を先頭に置き、新しい順に返す。Trial::rows()は同時刻のイベントを 1 行にまとめる。入力がない区間も残す。その行のheldは空になる。押しっぱなしの行は、最新のnow_usまで伸びる。押下が保持期間を超えても試行は区切らない。ロックは持たない。排他は app 側で行う。古いイベントを破棄しながら、最初の押下時刻と進行中の試行を内部状態に残す。
検証
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo test— 60 件成功cargo coupling --check --min-grade=B --max-circular=0 ./src— Grade A、循環 0Closes #5
Issue: #5