-
Notifications
You must be signed in to change notification settings - Fork 354
fix(desktop): 审查面板合流与协同审查入口修复,生成文件卡去重 #2048
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a4ee290
fix(desktop): 轮次审查合流 git 审查来源下拉,协同 worker 审查入口不再无响应
DavidShenXD f2d9490
fix(desktop): 本条消息生成的文件卡对转义残留路径去重
DavidShenXD b416d65
fix(desktop): 工作区外临时文件写入不再催生空的部分变更卡
DavidShenXD b716ed8
fix(desktop): 零文件变更卡不再显示误导性 +0 -0 与空审查入口
DavidShenXD f40a888
fix(desktop): detached 右栏跨会话轮次审查按宿主桶裁决与排队
DavidShenXD 27e7eba
fix(desktop): 保留 outside-workspace 零文件卡的可见性
DavidShenXD a0fee6b
test(device-link): pong 自动应答提前到建链前装配,修 Windows CI 时序 flake
DavidShenXD File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
apps/desktop/src/renderer/features/right-sidebar/lib/sidebarHostSession.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /** | ||
| * sidebarHostSession — 标记「当前聊天流内嵌在哪个会话的右栏(RSB)里」。 | ||
| * --------------------------------------------------------------------------- | ||
| * RSB 的 tab 桶按 session 划分,只有 Shell 当前注册的那个 session 的桶可见。 | ||
| * 协同(orca-workers)tab 挂在 lead 会话的桶里,里面内嵌 worker 会话的消息流; | ||
| * worker 流里的入口(如变更卡的「审查」)若把 tab 开进 worker 自己的桶,用户 | ||
| * 永远看不到(MainLayout 对 session 不匹配的可见性请求有意只持久化不动 UI)。 | ||
| * | ||
| * 该 context 由内嵌宿主(orca-workers tab body)提供 lead sessionId;消费方 | ||
| * (TurnChangesCard 等)据此把 tab 开到可见的宿主桶。默认 null = 消息流就是 | ||
| * 路由主实例,无需改桶。 | ||
| */ | ||
|
|
||
| import { createContext, useContext, type ReactNode } from 'react'; | ||
|
|
||
| const SidebarHostSessionContext = createContext<string | null>(null); | ||
|
|
||
| export function SidebarHostSessionProvider({ | ||
| sessionId, | ||
| children, | ||
| }: { | ||
| sessionId: string; | ||
| children: ReactNode; | ||
| }) { | ||
| return ( | ||
| <SidebarHostSessionContext.Provider value={sessionId}> | ||
| {children} | ||
| </SidebarHostSessionContext.Provider> | ||
| ); | ||
| } | ||
|
|
||
| /** 内嵌在 RSB tab 里时返回宿主(lead)sessionId;主实例返回 null。 */ | ||
| export function useSidebarHostSessionId(): string | null { | ||
| return useContext(SidebarHostSessionContext); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.