feat(workspace): copy tonight's first check for the band chat - #1120
feat(workspace): copy tonight's first check for the band chat#1120seonghobae wants to merge 6 commits into
Conversation
The ready map already names tonight's first playable range. Players still had to retype that sentence into KakaoTalk, Discord, or Messages. Copy the same localized next-action sentence onto the clipboard, fail closed on blank payloads, and name a manual copy when the window blocks the write.
📝 WalkthroughWalkthrough준비된 Workspace에 오늘의 첫 악기 확인 문장을 클립보드로 복사하는 기능이 추가되었습니다. Clipboard API와 Changes첫 확인 문장 복사
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🟡 Moderate · up to The PR adds copying for the displayed first-check sentence, but an older copy attempt can still mark a newer sentence as copied or unavailable, and the new helper may fail the repository’s documentation lint rule. Merge readiness therefore requires fixing or explicitly accepting these bounded issues. Sequence Diagram(s)sequenceDiagram
actor 연주자
participant Workspace
participant copyFirstRangeAction
participant 클립보드
연주자->>Workspace: 첫 확인 복사 버튼 클릭
Workspace->>copyFirstRangeAction: firstRangeCopy 전달
copyFirstRangeAction->>클립보드: Clipboard API 또는 execCommand로 복사
클립보드-->>copyFirstRangeAction: copied 또는 unavailable 반환
copyFirstRangeAction-->>Workspace: 결과 상태 전달
Workspace-->>연주자: 성공 또는 수동 복사 안내 표시
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 4 files. (8 skipped: 8 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 |
|
@opencode-agent Become the sole writer for the canonical Fresh current-head review verification found the remaining BandScope-owned correctness defect in Use TDD: add deferred-promise RED regressions that (1) start copy A, switch the displayed role/check to B, then resolve A and prove B remains idle; and (2) start attempts A then B for the same displayed sentence, resolve B first and A last, and prove only the latest request can determine the final status. Implement the smallest causal fix at the Workspace ownership boundary: bind each request to both a monotonic/current request identity and the exact sentence, invalidate pending work when A later same-head CodeRabbit finding is also verified against source and Also preserve and verify the already-landed accessibility repair on this exact lane: commits After the narrow repairs, run the focused desktop tests (including deferred role-change/overlap and focus restoration), lint/JSDoc, then full desktop/shared/analysis verification, exact 100% owned production coverage where exposed, and all current CI/security/SBOM/release/review gates. Refetch the successor head/base before changing thread/PR state; predecessor or queued evidence is non-passing. The PR body currently names |
|
@opencode-agent Rebind the sole-writer lease for the canonical Fresh exact-head source still has Use TDD on this same branch: add deferred-promise RED regressions for (1) A starts, displayed first check changes to B, A resolves, B remains idle; and (2) A then B start for the same displayed sentence, B resolves first, A last, only B determines final status. Make the narrow Workspace-owned repair by binding completion to a monotonic request identity plus the exact current sentence and invalidating pending authority when that sentence changes. Preserve the already-landed focus-restoration repair and current clipboard trust boundary. Run focused desktop tests, lint/JSDoc, full quickcheck, coverage and exact-head hosted gates, then refetch the successor head/base before resolving findings or changing merge state. Do not create a competing branch/PR, weaken gates, or transfer predecessor evidence. |
|
Current-head dependency note for |
|
@opencode-agent The prior sole-writer repair is complete; switch to independent review-only mode for exact current head |
Summary
The ready workspace already names tonight's first playable range. A bandmate still had to retype that sentence into KakaoTalk, Discord, or Messages before rehearsal. This PR copies the same localized first-check sentence already shown on the map. Blank or non-string payloads fail closed. A blocked clipboard names the next action (select tonight's first check and copy it) instead of inventing a span or dumping the failure.
Does not mix with #811, #828, #897, #1114, #1115, or #1118.
firstRangeSqueezeremains the span authority. #828 still owns MIR/#770.Exact current identity
develop@749511c3ad4000090048718f685c6bee6b3d2c25.038c367feceacde1d6d311fb8512f89f9ac1e898.feat/workspace-copy-first-action.All predecessor-head check/review results are historical only.
Current exact scope
copyFirstRangeActionwrites only a non-blank string the workspace already rendered.navigator.clipboard.writeTexton a user click; fall back to a hidden textarea +document.execCommand("copy")only when that API is absent or rejects.Workspaceassigns every copy attempt a monotonically advancing request sequence and the exact sentence requested. A sentence change invalidates every pending request before paint; only the latest request for the still-displayed sentence may publishcopyStatus.Root-cause verification and repairs
The predecessor exact head
d190f320a0c567095231659d3d80d1c1e6b02972failedrelease-preflightin./scripts/harness/quickcheck.sh. The first repository-owned failure was ESLintjsdoc/require-jsdocincopyFirstRangeAction.ts. Headb3048b709c98a23df53de7a88ee49ccbf432d9dedocumented those exact clipboard/result boundaries without lint suppression or rule weakening.Fresh review inspection then confirmed a separate functional race: an older async clipboard request could complete after a role/sentence change or after a newer copy request and overwrite the current card's status. The current implementation fixes that at the mounted Workspace boundary rather than disabling repeated copy attempts or hiding the review finding.
Workspace.copy-request-order.test.tsxadds executable deferred-promise regressions for both cases:No force push, bypass, self-approval, workflow weakening, or stale evidence transfer was used.
Verification
release-preflightfailure was inspected to the failing job/log and its JSDoc root cause was repaired in source.038c367f…must become terminal-success.Security Notes
Attack surface
Copied text is derived from untrusted analysis payloads: role names, section labels, and scientific-pitch range labels. Clipboard write is a local user-gesture side channel.
Trust boundary
firstRangeSqueezeremains the span authority.copyFirstRangeActiononly writes a non-blank string that the workspace already rendered. It does not invent a span, read the clipboard, or dereference files or URLs. Request-order state remains renderer-local and carries no external authority.Mitigations
Test points
copyFirstRangeAction.test.tsproves fail-closed blank payloads, exact-text writes, redacted writer failures, clipboard API success, execCommand fallback, focus restoration, and unavailable behavior.Workspace.test.tsxproves the button names tonight's first check, writes the clash sentence, copies the missing-range next action, localizes the Korean control, and hides clipboard errors.Workspace.copy-request-order.test.tsxproves reverse completion order and sentence-change invalidation.Dependency and Supply Chain
developshipped truth. This branch does not suppress repository security findings.i18n impact
workspaceFirstRangeCopyAction,workspaceFirstRangeCopied, andworkspaceFirstRangeCopyUnavailableremain aligned.Merge gate
Do not merge until this unchanged exact head has every applicable repository and central CI/build/release/security/SAST/SBOM/supply-chain/coverage/review gate terminal-success, zero valid unresolved findings, and a qualifying independent non-author approval under live protection. Queued, pending, neutral, skipped-required, cancelled, failed, predecessor-head, protected-base, model-only, self/author, or administrative-bypass evidence is non-passing.