fix: reconcile main's round-6 features after the rebase
- ChatView: #5880 auto-settle-on-merge setting flows into effectiveSettled, #5644 browser favicon project registration effect, activeProjectRef memo, desktopByTabId on both RightPanelTabs mounts - server: provide ServerSecretStore to the McpSessionRegistry's ServerEnvironment layer (#6325 reads publish opt-in per descriptor) - mobile: 3-way merged main's deltas into the v2 thread screens (NewTaskDraftScreen keeps the branch title seed + main's environmentId, threadListV2 keeps both new test suites, queries imports deduped) Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
8dcbdcac52
commit
d6e8dd8161
7 files changed
+615
-549
No files matched your search
@@ -183,6 +183,7 @@ import {
|
||||
projectScriptIdFromCommand,
|
||||
} from "~/projectScripts";
|
||||
import { newDraftId, newMessageId, newThreadId } from "~/lib/utils";
|
||||
import { registerFaviconProjectForThread } from "~/browserFaviconStore";
|
||||
import { getProviderModelCapabilities, resolveSelectableProvider } from "../providerModels";
|
||||
import { NO_PROVIDER_MODEL_SELECTION } from "../providerInstances";
|
||||
import { useClientSettings, useEnvironmentSettings } from "../hooks/useSettings";
|
||||
@@ -1789,9 +1790,11 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
});
|
||||
}, [activeThreadKey, existingOpenTerminalThreadKeys, terminalUiState.terminalOpen]);
|
||||
const latestRunSettled = isLatestRunSettled(activeLatestRun, activeRuntime);
|
||||
const activeProjectRef = activeThread
|
||||
? scopeProjectRef(activeThread.environmentId, activeThread.projectId)
|
||||
: null;
|
||||
const activeProjectRef = useMemo(
|
||||
() =>
|
||||
activeThread ? scopeProjectRef(activeThread.environmentId, activeThread.projectId) : null,
|
||||
[activeThread?.environmentId, activeThread?.projectId],
|
||||
);
|
||||
const activeProject = useProject(activeProjectRef);
|
||||
const handleNewThreadInActiveProject = useCallback(() => {
|
||||
startNewThreadForProject(activeProjectRef, handleNewThread);
|
||||
@@ -1841,6 +1844,10 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
// drive the environment picker in BranchToolbar.
|
||||
const allProjects = useProjects();
|
||||
const primaryEnvironmentId = primaryEnvironment?.environmentId ?? null;
|
||||
useEffect(() => {
|
||||
if (!activeThreadRef || !activeProjectRef) return;
|
||||
registerFaviconProjectForThread(activeThreadRef, activeProjectRef);
|
||||
}, [activeProjectRef, activeThreadRef]);
|
||||
const activeEnvironment =
|
||||
activeThread == null ? null : (environmentById.get(activeThread.environmentId) ?? null);
|
||||
const activeEnvironmentConnectionPhase = activeEnvironment?.connection.phase ?? "available";
|
||||
@@ -4291,6 +4298,7 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
// so the banner and the sidebar row never disagree.
|
||||
const activeThreadShell = useThreadShell(isServerThread ? activeThreadRef : null);
|
||||
const autoSettleAfterDays = useClientSettings((settings) => settings.sidebarAutoSettleAfterDays);
|
||||
const autoSettleOnMerge = useClientSettings((settings) => settings.sidebarAutoSettleOnMerge);
|
||||
const activeThreadPr = resolveThreadPr({
|
||||
threadBranch: activeThread?.branch ?? null,
|
||||
gitStatus: gitStatusQuery.data ?? null,
|
||||
@@ -4327,12 +4335,14 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
return effectiveSettled(activeThreadShell, {
|
||||
now: `${nowMinute}:00.000Z`,
|
||||
autoSettleAfterDays,
|
||||
autoSettleOnMerge,
|
||||
changeRequestState: activeThreadPr?.state ?? null,
|
||||
});
|
||||
}, [
|
||||
activeThreadPr?.state,
|
||||
activeThreadShell,
|
||||
autoSettleAfterDays,
|
||||
autoSettleOnMerge,
|
||||
nowMinute,
|
||||
supportsSettlement,
|
||||
]);
|
||||
@@ -6764,6 +6774,7 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
activeSurfaceId={activeRightPanelSurface?.id ?? null}
|
||||
pendingSurfaceIds={pendingFileSurfaceIds}
|
||||
previewSessions={activePreviewState.sessions}
|
||||
desktopByTabId={activePreviewState.desktopByTabId}
|
||||
terminalLabelsById={activeTerminalLabelsById}
|
||||
onActivate={activateRightPanelSurface}
|
||||
onCloseSurface={closeRightPanelSurface}
|
||||
@@ -6799,6 +6810,7 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
activeSurfaceId={activeRightPanelSurface?.id ?? null}
|
||||
pendingSurfaceIds={pendingFileSurfaceIds}
|
||||
previewSessions={activePreviewState.sessions}
|
||||
desktopByTabId={activePreviewState.desktopByTabId}
|
||||
terminalLabelsById={activeTerminalLabelsById}
|
||||
onActivate={activateRightPanelSurface}
|
||||
onCloseSurface={closeRightPanelSurface}
|
||||
|
||||
@@ -686,7 +686,6 @@ export const MessagesTimeline = memo(function MessagesTimeline({
|
||||
/>
|
||||
<TimelineMinimap
|
||||
items={minimapItems}
|
||||
bottomInset={contentInsetEndAdjustment}
|
||||
hasPersistentGutter={minimapHasPersistentGutter}
|
||||
hitStripWidth={minimapHitStripWidth}
|
||||
stripMap={minimapStripMap}
|
||||
@@ -817,14 +816,12 @@ function timelineMinimapEventTargetsPreview(target: EventTarget): boolean {
|
||||
}
|
||||
|
||||
function TimelineMinimap({
|
||||
bottomInset,
|
||||
hasPersistentGutter,
|
||||
hitStripWidth,
|
||||
items,
|
||||
stripMap,
|
||||
onSelect,
|
||||
}: {
|
||||
bottomInset: number;
|
||||
hasPersistentGutter: boolean;
|
||||
hitStripWidth: number;
|
||||
items: ReadonlyArray<TimelineMinimapItem>;
|
||||
@@ -884,19 +881,16 @@ function TimelineMinimap({
|
||||
return null;
|
||||
}
|
||||
|
||||
const safeBottomInset = Math.max(0, Math.ceil(bottomInset));
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"group/minimap pointer-events-none absolute top-0 left-0 z-40 hidden w-18 [@media(pointer:fine)]:block",
|
||||
"group/minimap pointer-events-none absolute inset-y-0 left-0 z-40 hidden w-18 [@media(pointer:fine)]:block",
|
||||
hasPersistentGutter
|
||||
? "opacity-100"
|
||||
: "opacity-0 transition-opacity duration-150 hover:opacity-100 focus-within:opacity-100",
|
||||
)}
|
||||
data-testid="timeline-minimap"
|
||||
data-persistent-gutter={hasPersistentGutter ? "true" : "false"}
|
||||
style={{ bottom: safeBottomInset }}
|
||||
>
|
||||
<div className="relative h-full w-full select-none">
|
||||
<button
|
||||
|
||||
Reference in new issue
Block a user