fix(rectification): open history cases with their bound skill identity (BUG-621)
Session open was sending the live registry version into v2, so every Skill bump rejected older cases with an unmapped 500 and no error on the clicked row. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -62,6 +62,9 @@ export type AppSidebarProps = {
|
||||
activeSessionId: string | null;
|
||||
/** A rectification session whose Case is being opened and hydrated; its row says so, statically. */
|
||||
openingSessionId?: string | null;
|
||||
/** Open failed for this history session; shown under that row only. */
|
||||
openErrorSessionId?: string | null;
|
||||
openErrorMessage?: string;
|
||||
account: SidebarAccount;
|
||||
accountMenuOpen: boolean;
|
||||
accountTriggerRef: Ref<HTMLButtonElement>;
|
||||
@@ -86,6 +89,8 @@ export function AppSidebar({
|
||||
charts,
|
||||
activeSessionId,
|
||||
openingSessionId = null,
|
||||
openErrorSessionId = null,
|
||||
openErrorMessage = "",
|
||||
account,
|
||||
accountMenuOpen,
|
||||
accountTriggerRef,
|
||||
@@ -159,6 +164,7 @@ export function AppSidebar({
|
||||
session={session}
|
||||
active={session.id === activeSessionId}
|
||||
opening={session.id === openingSessionId}
|
||||
error={session.id === openErrorSessionId && openErrorMessage ? openErrorMessage : undefined}
|
||||
disabled={sessionControls.disabled}
|
||||
menuOpen={sessionControls.menuSessionId === session.id}
|
||||
onMenuOpenChange={(open) => sessionControls.onMenuSessionChange(open ? session.id : null)}
|
||||
|
||||
@@ -46,6 +46,8 @@ type SidebarSessionRowProps = {
|
||||
readonly active: boolean;
|
||||
/** Its Case is being opened: a static note, no spinner. */
|
||||
readonly opening?: boolean;
|
||||
/** Open failed for this row: one line under the title, same notice scale as composer. */
|
||||
readonly error?: string;
|
||||
readonly disabled: boolean;
|
||||
readonly menuOpen: boolean;
|
||||
readonly onMenuOpenChange: (open: boolean) => void;
|
||||
@@ -61,6 +63,7 @@ export const SidebarSessionRow = forwardRef<HTMLButtonElement, SidebarSessionRow
|
||||
session,
|
||||
active,
|
||||
opening = false,
|
||||
error,
|
||||
disabled,
|
||||
menuOpen,
|
||||
onMenuOpenChange,
|
||||
@@ -110,6 +113,9 @@ export const SidebarSessionRow = forwardRef<HTMLButtonElement, SidebarSessionRow
|
||||
>
|
||||
<MoreHorizontal aria-hidden="true" />
|
||||
</Menu.Trigger>
|
||||
{error ? (
|
||||
<p className="session-open-error" role="alert">{error}</p>
|
||||
) : null}
|
||||
</div>
|
||||
<Menu.Portal>
|
||||
<Menu.Positioner className="session-actions-positioner" side="bottom" align="end" sideOffset={4} collisionPadding={12}>
|
||||
|
||||
Reference in New Issue
Block a user