feat(workspace): name tonight's first length change on the map - #1124
feat(workspace): name tonight's first length change on the map#1124seonghobae wants to merge 8 commits into
Conversation
Tell the player to count the new section length in before that arrival, or keep tonight's held length when every named section lasts the same.
| const seenSectionIds = new Set<string>(); | ||
| for (const sectionValue of runtimeSong.sections) { | ||
| if (!isRuntimeObject(sectionValue)) { | ||
| continue; | ||
| } | ||
| const sectionId = meaningfulRangeText(sectionValue.id); | ||
| if (!sectionId) { | ||
| continue; | ||
| } | ||
| if (seenSectionIds.has(sectionId)) { | ||
| return null; | ||
| } | ||
| seenSectionIds.add(sectionId); | ||
| } |
There was a problem hiding this comment.
| export function sectionDurationSeconds(timeRangeValue: unknown): number | null { | ||
| if (!isRuntimeObject(timeRangeValue)) { | ||
| return null; | ||
| } | ||
| const start = timeRangeValue.start; | ||
| const end = timeRangeValue.end; | ||
| if ( | ||
| typeof start !== "number" || | ||
| typeof end !== "number" || | ||
| !Number.isFinite(start) || | ||
| !Number.isFinite(end) || | ||
| !Number.isInteger(start) || | ||
| !Number.isInteger(end) || | ||
| start < 0 || | ||
| start > MAX_SECTION_TIME_SECONDS || | ||
| end <= start || | ||
| end > MAX_SECTION_TIME_SECONDS | ||
| ) { | ||
| return null; | ||
| } | ||
| return end - start; |
|
Warning Review limit reachedNext included review available in 47 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthrough리허설 곡에서 첫 구간 길이 변경 또는 유지를 계산합니다. 작업공간에는 상태 안내를 표시하고, 로드맵에는 대상 구간의 다음 카운트인 문구를 표시합니다. 시간 증거 검증, 다국어 문자열, 테스트, 문서가 추가되었습니다. Changes구간 길이 안내
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: 🟡 Moderate · up to The new rehearsal guidance can treat parser-generated fallback timing as a real one-second section, giving legacy songs incorrect count-in instructions and reporting unchanged lengths; merge should wait until synthetic timing is rejected. Sequence Diagram(s)sequenceDiagram
participant Workspace
participant firstDurationChange
participant TranslationCatalog
Workspace->>firstDurationChange: song 전달
firstDurationChange-->>Workspace: 첫 길이 상태 반환
Workspace->>TranslationCatalog: 상태별 번역 키와 토큰 전달
TranslationCatalog-->>Workspace: 안내 문자열 반환
Workspace-->>Workspace: first-duration-change 콜아웃 렌더링
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 7 files. (6 skipped: 6 unsupported.) ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| export function sectionDurationSeconds(timeRangeValue: unknown): number | null { | ||
| if (!isRuntimeObject(timeRangeValue)) { | ||
| return null; | ||
| } | ||
| const start = timeRangeValue.start; | ||
| const end = timeRangeValue.end; | ||
| if ( | ||
| typeof start !== "number" || | ||
| typeof end !== "number" || | ||
| !Number.isFinite(start) || | ||
| !Number.isFinite(end) || | ||
| !Number.isInteger(start) || | ||
| !Number.isInteger(end) || | ||
| start < 0 || | ||
| start > MAX_SECTION_TIME_SECONDS || | ||
| end <= start || | ||
| end > MAX_SECTION_TIME_SECONDS | ||
| ) { | ||
| return null; | ||
| } | ||
| return end - start; |
|
Succession-in-progress evidence: the exact |
| export async function loadProject(): Promise<RehearsalSong> { | ||
| const response = await invokeAnalysis("load_project"); | ||
| return parseRehearsalSong(response); | ||
| return parseRehearsalSongWithTimingEvidence(response); |
There was a problem hiding this comment.
🟡 Saved legacy timings become measured
After a legacy project is saved and reopened, parseRehearsalSongWithTimingEvidence treats its serialized placeholder as explicit timing. The rehearsal map then presents a fabricated section length and count-in.
Prompt for agents
Preserve synthetic section-timing provenance across the save/load round trip. loadProject currently marks migrated ranges with a symbol, but saveProject calls parseRehearsalSong and sends JSON through Tauri; both serialization steps discard symbol keys while retaining the generated one-second timeRange. A later load therefore cannot distinguish that placeholder from measured timing. Update the project persistence boundary or project format so synthetic ranges remain identifiable after saving, while explicit measured one-second ranges remain eligible. Add a regression test covering legacy load, save payload, and reload.
Was this helpful? React with 👍 or 👎 to provide feedback.
|
Superseded by canonical first-change owner #1122 at exact head Technical succession evidence:
This closure does not transfer #1124 checks, reviews, or approvals. #1122's new exact head requires its own fresh protected-gate and independent-review evidence. |
Product outcome
Name tonight's first consecutive section-length change on the ready rehearsal map and tell the player to count the new length in before that section. When every named section lasts the same number of seconds, keep that length instead of inventing a reset. The matching Section Roadmap card repeats the next count-in.
This is a BandScope-owned buyer gap on shipped
section.timeRangeevidence. It does not replace #1122 (first groove change), #991 (first groove), #828/#770 (MIR), #811 (CLI authority), or #897 (Storybook tokens).Exact current identity
develop@749511c3ad4000090048718f685c6bee6b3d2c25.3c9eb80f38170ee508347f43052c71f9a8048855.feat/workspace-first-duration-change.Current exact scope
firstDurationChangevalidates every meaningful runtime section ID for uniqueness before deriving any duration evidence, so an ineligible or later duplicate cannot create an ambiguous card target or bypass validation through an early return.timeRangeevidence, and returns the first consecutive pair whose integer duration differs.Verification boundary
Desktop unit tests for
firstDurationChange, Workspace, and SectionRoadmap passed locally on this exact head (39 tests). Typecheck passed. Fresh repository workflows for exact head3c9eb80f38170ee508347f43052c71f9a8048855are non-passing until terminal. Predecessor checks/reviews do not transfer.Merge gate
developshipped truth. This branch inherits that JavaScript baseline and does not suppress inherited findings. Inherited npm HIGH findings must not be suppressed here.Summary by CodeRabbit
새로운 기능
문서
테스트