Conversation
表示層のうち「テストで守れる範囲」だけを先に実施。スワイプ/ズームの実 DOM 挙動には触っていない。 差分 +66/-491(新設除く)、テスト 913 → 959。 - layout/allDayPanels.ts を新設: 終日レーンの行割り当て・3パネル共有の最大行数・「+N」あふれを 純関数化(WeekGrid の3連 useMemo 86行 → 3行の呼び出し)。**ズレると終日バーが消える/重なる** 種類のロジックなのでテスト25件で厚く固定 ―― 複数日バーのクリップ、パネル境界ちょうど、 重なり時の行分割と空き行再利用、共有行数の境界を両側から、+N の件数展開と titles 順、 パネル間で配列を共有していないこと、そして **WeekGrid が呼ぶのと同じ3段の通しテスト** - components/RailBand.tsx に OooRailLine(133行)と WorkingLocationRailBand(134行)を統合し variant で出し分け(両ファイルは削除)。CSS クラス名は不変。勤務場所の subject は型で Occurrence に 限定されるため、共通化した分岐でも旧実装と同一結果になることを型で保証 - layout/railItems.ts に railItemsForDay<T> を新設(本体が完全一致だった2関数を generic 化、 既存テストはラッパー経由で全通過 + 半開区間の境界を9件追加) - layout/clusterByTopPx.ts に activity/CI のクラスタリングを generic 化(12件。**px 基準である ことの証明** ―― 同じ5分差が 48px/h ではまとまり 120px/h では分かれる)。畳み込みラベルの 文字列生成も共通化。DOM 側は共通化しない判断(差分が props 注入コストを上回り、React 描画 テストが無いため回帰の担保が取れない) - 旧コンポーネント名を指すコメント参照を8ファイルで RailBand へ言い換え web 959 tests, typecheck/build clean。lint 警告 9(ベースラインと同一)。 実ブラウザ(demo)で描画とコンソールエラー無しを確認。ただし**デモデータに終日予定・OOO・ 勤務場所が無いため、その2レーンの見た目は実データでの確認が必要**。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HGESE2zBNzoW8MYvtEySBQ
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.
表示層のテストで守れる範囲。差分 +66/-491、テスト 913 → 959。
🤖 Generated with Claude Code
https://claude.ai/code/session_01HGESE2zBNzoW8MYvtEySBQ