fix(ui): migrate remaining Monaco views to Shiki - #10708
Conversation
Code Review by Qodo
1. Workspace comparisons show wrong files
|
a46437c to
abb34c0
Compare
|
Code review by qodo was updated up to the latest commit abb34c0 |
abb34c0 to
8e13b62
Compare
|
Code review by qodo was updated up to the latest commit 8e13b62 |
|
Code review by qodo was updated up to the latest commit 25668ea |
|
Code review by qodo was updated up to the latest commit 808b1e2 |
|
Code review by qodo was updated up to the latest commit 8519fa6 |
|
Code review by qodo was updated up to the latest commit aa439ac |
|
Code review by qodo was updated up to the latest commit 9532a5f |
|
Code review by qodo was updated up to the latest commit afcee76 |
|
Code review by qodo was updated up to the latest commit c27e3d4 |
|
Code review by qodo was updated up to the latest commit 92f31e9 |
|
Code review by qodo was updated up to the latest commit 7e8884e |
|
Code review by qodo was updated up to the latest commit 9546b02 |
|
Code review by qodo was updated up to the latest commit fdae28b |
|
Code review by qodo was updated up to the latest commit 6f4ef21 |
|
Code review by qodo was updated up to the latest commit 71a5d9d |
…g-monaco # Conflicts: # .bitmap # workspace.jsonc
|
Code review by qodo was updated up to the latest commit a883cd9 |
| const sidebarFiles = useMemo<FileInfo[] | undefined>(() => { | ||
| // The registry object is stable; its monotonic version invalidates this view-derived projection. | ||
| void fileRegistryVersion; | ||
| if (viewMode === 'code') return fileRegistry?.getFiles(componentId); | ||
| if (viewMode === 'config') return fileRegistry?.getAspectFiles(componentId); |
There was a problem hiding this comment.
1. Workspace comparisons show wrong files 🐞 Bug ≡ Correctness
CompareView builds the new sidebar file list from useCompareData() and useApiDiff() results, but its enclosing CompareDataProvider and API query omit the page's host prop. When the page is rendered for the workspace host, those queries fall back to the default host while InlineComponentCompare uses the supplied workspace host, so the sidebar can list files or API exports from a different comparison than the diff pane.
Agent Prompt
Issue description
The newly added sidebar derives its files from bulk comparison and API-diff queries that do not receive the `host` selected for `ComponentComparePage`. This makes workspace-host comparisons inconsistent with the inline diff renderer, which does receive that host.
Fix Focus Areas
- scopes/component/component-compare/component-compare-page.tsx[229-229]
- scopes/component/component-compare/component-compare-page.tsx[346-346]
Recommended Fix
Pass `host={hostFromProps}` to `CompareDataProvider`, and pass `host` in the options supplied to `useApiDiff(baseId, compareId, ...)`. Keep the existing `skip` option alongside the host so all data used by the sidebar and mode calculations targets the same host as `InlineComponentCompare`.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Code review by qodo was updated up to the latest commit 4c67e39 |
Summary
API Reference change request
https://bit.cloud/teambit/api-reference/~change-requests/migrate-api-code-rendering-v2