[Bug] コンテスト別で、同じ問題が別コンテストに存在するときに、回答状況の同期させられるようにしましょう
Summary / 概要
- Describe the bug. A clear and concise description of what the bug is.
Steps to reproduce / 再現方法
- 例: コンテスト別で、典型90問 019. Pick Two(★6)と鉄則本 C18 - Pick Two(★6)の片方の回答状況を更新
- もう片方のテーブルを見ると、回答状況が同期されていない。リロードすると同期される
- zzz
environments
-
Desktop (please complete the following information):
OS: [e.g. Mac, Windows11, Linux] Browser [e.g. Chrome, Safari, Edge, Firefox] Version [e.g. 117.0.05938.44]
-
Smartphone (please complete the following information):
Device: [e.g. iPhone15, Android13] OS: [e.g. iOS16.5, Android 13] Browser [e.g. Chrome, Safari] Version [e.g. 16.5]
-
Tablet (please complete the following information):
OS: [e.g. Android OS, Chrome OS, Windows11, iPad OS] Browser [e.g. Chrome, Safari, Edge, Firefox] Version [e.g. 16.5]
Expected behavior / 期待される挙動
- 同じ問題については、回答が同じ状態に更新される
- リロードしなくても更新されるようにしたい
Actual behavior / 実際の挙動
- リロードすれば同期される
Screenshots
- If applicable, add screenshots to help explain your problem.
Other notes / その他
- Add any other context about the problem here.
- Will you try to create a pull request?
- yes / no
A summary of the changes CodeRabbit can apply:
Update src/lib/components/TaskTables/TaskTable.svelte to modify handleUpdateTaskResult so it iterates all task results and updates every instance with the same task_id (preserving contest_id, task_table_index, title), and updates taskResultsMap and the taskResults array to ensure Svelte reactivity and real-time synchronization of answer status across contests.
Update src/lib/components/TaskTables/TaskTable.svelte by replacing handleUpdateTaskResult() so it iterates all taskResults and, for every entry with the same task_id, updates status fields (status_id, status_name, is_ac, updated_at) in both taskResultsMap and the taskResults array while preserving contest-specific fields (contest_id, task_table_index, title) to synchronize answer status across contests in real-time.
- [ ] ✅ Create PR with these edits
- [ ] 📋 Get copyable edits