Skip to content

Add V2 rehearsal collaboration metadata and workspace surfacing#324

Merged
seonghobae merged 8 commits into
developfrom
copilot/add-advanced-rehearsal-collaboration
Jun 18, 2026
Merged

Add V2 rehearsal collaboration metadata and workspace surfacing#324
seonghobae merged 8 commits into
developfrom
copilot/add-advanced-rehearsal-collaboration

Conversation

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

V2 collaboration work needs the Rehearsal Workspace to carry more than static role cards: richer assignments, discussion/approval state, and clearer harmonic simplification/transposition context. This change adds those planning primitives to the shared song model and exposes them in the desktop workspace without introducing cloud sync behavior.

Refs #152.

Shared rehearsal contract

  • Adds optional RehearsalSong.collaboration metadata for assignment, comment, approval, and sync posture summaries.
  • Adds role-level harmonic explanation and transposition planning fields.
  • Extends contract validation and regression tests for the new collaboration and role-planning fields.

Workspace UI

  • Adds a collaboration summary panel for assignment/comment/approval counts and local/planned sync posture.
  • Adds selected-role planning panels for harmonic explanation, transpose/simplify guidance, filtered assignments/comments, and approval state.
  • Keeps copy practical and rehearsal-first; cloud sync is explicitly described as planned only, not active behavior.

Verification

  • npm run test --workspace @bandscope/shared-types
  • npm run typecheck --workspace @bandscope/shared-types
  • npm run lint --workspace @bandscope/shared-types
  • npm run typecheck --workspace @bandscope/desktop
  • npm run lint --workspace @bandscope/desktop
  • npm run test --workspace @bandscope/desktop
  • npm run build --workspace @bandscope/desktop
  • Browser check at http://127.0.0.1:5173/ using the browser YouTube fallback path; verified desktop and mobile widths.

Security Notes

  • No new runtime network path, cloud sync transport, IPC command, subprocess, file API, WebView capability, update path, model download, telemetry, or export sink is introduced.
  • New collaboration data is local song/project metadata and is parsed through the shared contract validator before use.
  • The sync state is descriptive only (local_only / planned_cloud) so the UI does not imply active cloud behavior before security and conflict-resolution rules exist.
  • Logging/privacy impact is unchanged; assignment/comment/approval text is rendered locally and is not sent out by this change.
  • Test points cover malformed collaboration fields, role-planning fields, localized workspace rendering, and export behavior.

Copilot AI requested review from Copilot and removed request for Copilot June 16, 2026 15:18
Copilot AI requested review from Copilot and removed request for Copilot June 16, 2026 15:20
Copilot AI changed the title [WIP] Add richer collaboration mechanics to rehearsal workspace Add V2 rehearsal collaboration metadata and workspace surfacing Jun 16, 2026
Copilot AI requested a review from seonghobae June 16, 2026 15:22
Copilot AI review requested due to automatic review settings June 18, 2026 11:17
@seonghobae seonghobae marked this pull request as ready for review June 18, 2026 11:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends BandScope’s shared rehearsal song contract with V2 collaboration metadata (assignments/comments/approvals + sync posture) and role-level planning fields (harmonic explanation + transposition plan), then surfaces these planning primitives in the desktop Workspace UI with EN/KO localization and updated demo seed/test coverage.

Changes:

  • Extended RehearsalSong / RehearsalRole contracts with collaboration + planning fields, and added runtime validation for the new shapes.
  • Enriched demo rehearsal song seed + shared-types tests to exercise the new fields and validation branches.
  • Added Workspace UI panels for collaboration summary and role-scoped planning (explanation + transpose/simplify + filtered collaboration items), plus new EN/KO strings and UI tests.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/shared-types/src/index.ts Adds new collaboration/planning types, demo seed data, and validation logic for the expanded rehearsal contract.
packages/shared-types/test/index.test.ts Updates shared-types tests to assert new fields and validation failures for collaboration/planning data.
apps/desktop/src/features/workspace/Workspace.tsx Surfaces collaboration summary + role-level planning details in the workspace UI.
apps/desktop/src/features/workspace/Workspace.test.tsx Adds UI test coverage for the new collaboration + planning panels.
apps/desktop/src/locales/en/common.json Adds English copy for collaboration/planning UI labels and fallback messaging.
apps/desktop/src/locales/ko/common.json Adds Korean copy for collaboration/planning UI labels and fallback messaging.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/desktop/src/features/workspace/Workspace.tsx
Comment thread apps/desktop/src/features/workspace/Workspace.tsx
Comment thread apps/desktop/src/features/workspace/Workspace.tsx
Comment thread apps/desktop/src/features/workspace/Workspace.tsx Outdated
Comment thread apps/desktop/src/features/workspace/Workspace.tsx Outdated
Comment thread apps/desktop/src/features/workspace/Workspace.test.tsx
@opencode-agent

opencode-agent Bot commented Jun 18, 2026

Copy link
Copy Markdown

OpenCode Review Overview

  • Head SHA: c98aac7588509009b5d12a6adef4bc702b0aba57
  • Workflow run: 27757618874
  • Workflow attempt: 1
  • Gate result: APPROVE (approval step)

Pull request overview

The PR introduces updates to workspace and shared-types modules, including new tests and localized strings. No failed checks or structural issues found.

Findings

No blocking findings from OpenCode's independent review.

Verification

  • Review source: independent OpenCode review of the current checkout, focused changed hunks, and current-head GitHub Check evidence.
  • Structural exploration: completed before approval; if structural exploration, changed-file inspection, or evidence completeness is missing, OpenCode must not approve.
  • Result: APPROVE
  • Reason: Structural exploration completed with no source-backed blockers. Changes are well-contained and tested.

Gate evidence

  • Head SHA: c98aac7588509009b5d12a6adef4bc702b0aba57
  • Workflow run: 27757618874
  • Workflow attempt: 1

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

PR adds new workspace features but introduces type safety risks in shared types and lacks test coverage for critical components. Requires additional validation and tests before merging.

Findings

1. HIGH packages/shared-types/src/index.ts:23 - Missing runtime validation for ProjectSummary

  • Problem: ProjectSummary type lacks runtime validation which could lead to data integrity issues when passed between processes
  • Root cause: No validation function exists for ProjectSummary type while similar types have validation (e.g., validateRehearsalSong)
  • Fix: Add runtime validation using Zod or custom validation function
  • Regression test: Add unit tests that verify validation rejects invalid ProjectSummary objects
  • Suggested diff:
@@ -344,0 +345,10 @@
+export function validateProjectSummary(value: unknown): string | null {
+  if (typeof value !== 'object' || value === null) return 'Invalid type';
+  const obj = value as ProjectSummary;
+  if (!obj.id || typeof obj.id !== 'string') return 'Invalid id';
+  if (!obj.title || typeof obj.title !== 'string') return 'Invalid title';
+  if (!['idle','running','done','failed'].includes(obj.status)) return 'Invalid status';
+  if (!Array.isArray(obj.supportedAudioFormats)) return 'Invalid audio formats';
+  return null;
+}

2. MEDIUM apps/desktop/src/features/workspace/Workspace.tsx:12 - Incomplete prop validation

  • Problem: WorkspaceProps interface doesn't validate sourceBootstrap prop structure
  • Root cause: ProjectBootstrapSummary type lacks runtime checking before usage
  • Fix: Add PropTypes or runtime validation for sourceBootstrap prop
  • Regression test: Add test case that passes invalid sourceBootstrap and verifies error handling
  • Suggested diff:
@@ -15,0 +16,3 @@
+  if (sourceBootstrap && !isValidProjectBootstrap(sourceBootstrap)) {
+    throw new Error('Invalid sourceBootstrap structure');
+  }

3. HIGH apps/desktop/src/features/workspace/Workspace.test.tsx:82 - Insufficient test coverage for new types

  • Problem: No tests exist for new RehearsalWorkspace and ProjectSummary types
  • Root cause: Test file doesn't cover type validation or component behavior with new data structures
  • Fix: Add tests that verify component behavior with valid/invalid ProjectSummary objects
  • Regression test: Cover all status cases ('idle','running','done','failed') in tests
  • Suggested diff:
@@ -82,0 +83,25 @@
+describe('ProjectSummary validation', () => {
+  test('validates correct structure', () => {
+    const valid: ProjectSummary = {
+      id: '1',
+      title: 'Test',
+      status: 'running',
+      supportedAudioFormats: ['mp3']
+    };
+    expect(validateProjectSummary(valid)).toBeNull();
+  });
+
+  test('rejects missing id', () => {
+    const invalid = { title: 'Test', status: 'running', supportedAudioFormats: ['mp3'] };
+    expect(validateProjectSummary(invalid)).toMatch('Invalid id');
+  });
+
+describe('Workspace component', () => {
+  test('handles invalid sourceBootstrap prop', () => {
+    jest.spyOn(console, 'error').mockImplementation(() => {});
+    expect(() => render(
+      <Workspace song={mockSong} sourceBootstrap={{ invalid: true }} />
+    )).toThrow('Invalid sourceBootstrap structure');
+  });
+});

Verification

  • Review source: independent OpenCode review of the current checkout, focused changed hunks, and current-head GitHub Check evidence.
  • Structural exploration: mandatory before any conclusion; use CodeGraph first when available, otherwise focused local source/diff inspection is required.
  • Result: REQUEST_CHANGES
  • Reason: Found critical issues in type safety and test coverage

Gate evidence

  • Head SHA: e223cb51bc476e3a7450c0a55a522781ea6b4f1b
  • Workflow run: 27755819508
  • Workflow attempt: 1

Copilot AI review requested due to automatic review settings June 18, 2026 11:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment thread apps/desktop/src/features/workspace/Workspace.tsx
Comment thread packages/shared-types/src/index.ts Outdated
opencode-agent[bot]
opencode-agent Bot previously approved these changes Jun 18, 2026

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

The PR introduces updates to workspace and shared-types modules, including new test coverage and localized strings. No critical issues or regressions were identified during structural exploration.

Findings

No blocking findings from OpenCode's independent review.

Verification

  • Review source: independent OpenCode review of the current checkout, focused changed hunks, and current-head GitHub Check evidence.
  • Structural exploration: completed before approval; if structural exploration, changed-file inspection, or evidence completeness is missing, OpenCode must not approve.
  • Result: APPROVE
  • Reason: Structural exploration completed with no critical issues found. Changes are well-contained and tested.

Gate evidence

  • Head SHA: 8f9255e7ecc23fa780e0f9c519e0ce1dfffa698a
  • Workflow run: 27756997777
  • Workflow attempt: 1

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

The PR introduces updates to workspace and shared-types modules, including new tests and localized strings. No failed checks or structural issues found.

Findings

No blocking findings from OpenCode's independent review.

Verification

  • Review source: independent OpenCode review of the current checkout, focused changed hunks, and current-head GitHub Check evidence.
  • Structural exploration: completed before approval; if structural exploration, changed-file inspection, or evidence completeness is missing, OpenCode must not approve.
  • Result: APPROVE
  • Reason: Structural exploration completed with no source-backed blockers. Changes are well-contained and tested.

Gate evidence

  • Head SHA: c98aac7588509009b5d12a6adef4bc702b0aba57
  • Workflow run: 27757618874
  • Workflow attempt: 1

@seonghobae seonghobae merged commit 42e3f0f into develop Jun 18, 2026
25 checks passed
@seonghobae seonghobae deleted the copilot/add-advanced-rehearsal-collaboration branch June 18, 2026 12:07
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.

3 participants