Skip to content

Fix DiffTab and AIReviewTab Monaco theme handling, layout, and tab reuse#135

Merged
Stasshe merged 11 commits intomainfrom
copilot/add-theme-setting-difftab
Dec 3, 2025
Merged

Fix DiffTab and AIReviewTab Monaco theme handling, layout, and tab reuse#135
Stasshe merged 11 commits intomainfrom
copilot/add-theme-setting-difftab

Conversation

Copy link
Contributor

Copilot AI commented Dec 3, 2025

  • Fix DiffTab and AIReviewTab theme handling with defineAndSetMonacoThemes
  • Fix DiffTab height issue - single file diff now uses full container height with height: 100%
  • Increase multiple files diff height from 360px to 500px
  • Remove as any type casts - use proper ThemeColors type from @/context/ThemeContext
  • Fix DiffTab opening multiple tabs in same pane - improved shouldReuseTab to compare commit IDs and file paths
  • Fix theme not being applied after tab switch - removed caching that was skipping setTheme calls
  • Simplify: removed updateDiffTabContent and extended updateTabContent to handle both editor and diff tabs
Original prompt

コードエディターの方と違って、difftabが、テーマの設定ができてない。いつもライトになってる。より良くして。


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@Stasshe
Copy link
Owner

Stasshe commented Dec 3, 2025

@copilot あと、なぜかdiffタブの下の方が、切れてる。下までちゃんと表示されてない。固定になってる。

…emes

Co-authored-by: Stasshe <133995608+Stasshe@users.noreply.github.com>
Copilot AI changed the title [WIP] Add theme settings for difftab Fix DiffTab and AIReviewTab Monaco theme handling Dec 3, 2025
Copilot AI requested a review from Stasshe December 3, 2025 08:45
@Stasshe
Copy link
Owner

Stasshe commented Dec 3, 2025

@copilot あと、この問題が直ってない。

切れてる。下までちゃんと表示されてない。固定になってる。
diffが、1つのファイルの時。後、複数あるやつの方でも、もう少し高さを取るように。

Co-authored-by: Stasshe <133995608+Stasshe@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 3, 2025

@copilot あと、なぜかdiffタブの下の方が、切れてる。下までちゃんと表示されてない。固定になってる。

修正しました (34aa4fb)。単一ファイルのDiffの場合、固定高さ(360px)ではなく、コンテナの全高さを使用するように変更しました。複数ファイルの場合は従来通りスクロール可能な固定高さです。

また、colors as anyの型キャストもThemeColors型を正しく使用するように修正しました。

Copilot AI changed the title Fix DiffTab and AIReviewTab Monaco theme handling Fix DiffTab and AIReviewTab Monaco theme handling and layout Dec 3, 2025
@Stasshe
Copy link
Owner

Stasshe commented Dec 3, 2025

@copilot difftabが同じペーンで、何個もひらけてしまう問題も、ついでに修正して。後、できれば、codeeditor同士のように、別ペーンで同じファイル編集したときに、diffタブでも、リアルタイムで変更を共有し合うようにしたい。

… use 500px

Co-authored-by: Stasshe <133995608+Stasshe@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 3, 2025

@copilot あと、この問題が直ってない。

切れてる。下までちゃんと表示されてない。固定になってる。
diffが、1つのファイルの時。後、複数あるや...

修正しました (0f2a8e1)。

  • 単一ファイルのDiff: height: 100%を追加してコンテナの全高さを使用
  • 複数ファイルのDiff: 360px → 500px に高さを増加

Co-authored-by: Stasshe <133995608+Stasshe@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 3, 2025

@copilot difftabが同じペーンで、何個もひらけてしまう問題も、ついでに修正して。後、できれば、codeeditor同士のように、別ペーンで同じファイル編��...

修正しました (5fb651f)。

  1. 同じペーンで複数開けてしまう問題: shouldReuseTabを改善し、コミットIDとファイルパスで比較するようにしました。同じDiffを開こうとすると既存タブが再利用されます。

  2. リアルタイム変更共有: fileRepository.addChangeListenerを使って、別ペーンで同じファイルが編集された際にDiffTabのコンテンツも自動更新されるようにしました。

…rowing

Co-authored-by: Stasshe <133995608+Stasshe@users.noreply.github.com>
Copilot AI changed the title Fix DiffTab and AIReviewTab Monaco theme handling and layout Fix DiffTab and AIReviewTab Monaco theme handling, layout, and tab reuse Dec 3, 2025
@Stasshe
Copy link
Owner

Stasshe commented Dec 3, 2025

@copilot リアルタイム同期について。そのコードは間違えています。デバウンス待機状態では、savefileされないので。メモリ上で管理する必要がある。page.tsxだったかな?

…tead of fileRepository listener

Co-authored-by: Stasshe <133995608+Stasshe@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 3, 2025

@copilot リアルタイム同期について。そのコードは間違えています。デバウンス待機状態では、savefileされないので。メモリ上で管理する必要がある。...

修正しました (041a62e)。

fileRepository.addChangeListenerを削除し、メモリベースのupdateDiffTabContent関数をtabStoreに追加しました。これはCodeEditorのupdateTabContentと同じパターンで、デバウンス待機中でも全ペーンの同じパスを持つDiffTabのコンテンツがリアルタイムで同期されます。

Co-authored-by: Stasshe <133995608+Stasshe@users.noreply.github.com>
@Stasshe
Copy link
Owner

Stasshe commented Dec 3, 2025

@copilot この問題が解決してない。修正して。また、diffタブから、to or from, 切り替えた時、全てのコードエディタまでテーマ再設定される。意味わからん。重い。

… EditorTab

Co-authored-by: Stasshe <133995608+Stasshe@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 3, 2025

@copilot この問題が解決してない。修正して。また、diffタブから、to or from, 切り替えた時、全てのコードエディタまでテーマ再設定される。意味わか�...

修正しました (bb7ca19)。

  1. テーマ再設定問題: defineAndSetMonacoThemesを最適化し、テーマが既に同じ場合はsetThemeを呼び出さないようにしました。これでDiffTab切り替え時に全エディタのテーマが再設定されなくなります。

  2. リアルタイム同期:

    • updateTabContentがDiffTabも更新するように拡張
    • updateDiffTabContentがEditorTabも更新するように拡張
    • EditorTabで編集するとDiffTabに反映、DiffTabで編集するとEditorTabに反映されます

@Stasshe
Copy link
Owner

Stasshe commented Dec 3, 2025

@copilot 2じゃダメ?updateTabContentを拡張してDiffTab対応にし、updateDiffTabContentを削除

…support both editor and diff tabs

Co-authored-by: Stasshe <133995608+Stasshe@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 3, 2025

@copilot 2じゃダメ?updateTabContentを拡張してDiffTab対応にし、updateDiffTabContentを削除

修正しました (3141796)。

updateDiffTabContentを削除し、updateTabContentを拡張してeditorとdiff両方に対応するようにしました。これでコードがシンプルになりました。

@Stasshe
Copy link
Owner

Stasshe commented Dec 3, 2025

@copilot
謎に重いのは治った。しかし、すべてのeditorでテーマ設定ガされない

Co-authored-by: Stasshe <133995608+Stasshe@users.noreply.github.com>
@Stasshe Stasshe temporarily deployed to copilot/add-theme-setting-difftab - pyxis-code PR #135 December 3, 2025 09:59 — with Render Destroyed
@Stasshe Stasshe marked this pull request as ready for review December 3, 2025 10:03
@Stasshe Stasshe merged commit 6856de9 into main Dec 3, 2025
@Stasshe Stasshe deleted the copilot/add-theme-setting-difftab branch December 3, 2025 10:05
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.

2 participants