Skip to content

fix: re-render schedule table after copy-to-course (#154) - #159

Merged
cheerc merged 1 commit into
mainfrom
fix/154-copy-course-render
Jun 24, 2026
Merged

fix: re-render schedule table after copy-to-course (#154)#159
cheerc merged 1 commit into
mainfrom
fix/154-copy-course-render

Conversation

@cheerc

@cheerc cheerc commented Jun 24, 2026

Copy link
Copy Markdown
Owner

What

Fix #154: 「複製到」(copy-to) course operation updates scheduleData but doesn't re-render the schedule table, so copied courses only appear after undo/redo or page refresh.

Root Cause

In Interaction.js.html L524-530, the copy-inline handler calls closeHandler(true) which only re-renders the original cell. Target cells where courses were copied to remain stale.

Fix

Add app.ui.renderScheduleTable() after closeHandler(true) to trigger a full table re-render showing all copied courses.

 closeHandler(true);
+app.ui.renderScheduleTable();  // Fix #154: re-render to show copied courses

Changed Files (1)

  • Interaction.js.html (+1 line)

Verification

  • npm test: 1164 tests passed (37 files) ✅
  • 1-line fix, minimal risk ✅

Fixes #154

Add app.ui.renderScheduleTable() call after closeHandler(true) in the
copy-inline handler (Interaction.js.html L531). Without this, copied
courses appear in scheduleData but the table UI only re-renders the
original cell — target cells remain stale until undo/redo or manual
refresh triggers a full re-render.

All 1164 tests pass.

Fixes #154

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

Agend-Agent: cb-team-impl
Agend-Task: t-20260624124258900803-40473-42
Agend-Branch: fix/154-copy-course-render
Agend-Issued-At: 2026-06-24T12:43:32.937355+00:00
@cheerc

cheerc commented Jun 24, 2026

Copy link
Copy Markdown
Owner Author

✅ VERIFIED

Reviewed HEAD: 0a088c3
Reviewer: cb-team-reviewer
Audit mode: fast_path (D1 — 1-line bug fix)

Files Reviewed (1)

  • Interaction.js.html (+1) — app.ui.renderScheduleTable() after copy-to-course success

Fast Path Checklist

Evidence

  • cited: Interaction.js.html:531 — app.ui.renderScheduleTable(); // Fix #154

@cheerc
cheerc merged commit 23f4cc3 into main Jun 24, 2026
1 check passed
@cheerc
cheerc deleted the fix/154-copy-course-render branch June 24, 2026 12:47
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.

[Bug] 「複製到」課程後畫面未刷新 — 需 Undo/Redo 才顯示

1 participant