mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-07 16:35:48 +01:00
Fix conference room navigation refresh
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
37f9e3b6d6
commit
ce5ee9a23c
5 files changed
+41
-3
No files matched your search
@@ -1785,6 +1785,35 @@ describe("IssueChatThread", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("does not render an empty placeholder when the empty message is blank", () => {
|
||||
const root = createRoot(container);
|
||||
|
||||
act(() => {
|
||||
root.render(
|
||||
<MemoryRouter>
|
||||
<IssueChatThread
|
||||
comments={[]}
|
||||
linkedRuns={[]}
|
||||
timelineEvents={[]}
|
||||
liveRuns={[]}
|
||||
onAdd={async () => {}}
|
||||
showComposer={false}
|
||||
emptyMessage=""
|
||||
enableLiveTranscriptPolling={false}
|
||||
/>
|
||||
</MemoryRouter>,
|
||||
);
|
||||
});
|
||||
|
||||
expect(container.textContent).toContain("Jump to latest");
|
||||
expect(container.textContent).not.toContain("This issue conversation is empty");
|
||||
expect(container.querySelector(".border-dashed")).toBeNull();
|
||||
|
||||
act(() => {
|
||||
root.unmount();
|
||||
});
|
||||
});
|
||||
|
||||
it("shows non-image attachment upload state in the composer after a drop", async () => {
|
||||
const root = createRoot(container);
|
||||
const onAttachImage = vi.fn(async (file: File) => ({
|
||||
|
||||
@@ -451,7 +451,7 @@ function IssueChatFallbackThread({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{messages.length === 0 ? (
|
||||
{messages.length === 0 && emptyMessage.trim().length > 0 ? (
|
||||
<div className={cn(
|
||||
"text-center text-sm text-muted-foreground",
|
||||
variant === "embedded"
|
||||
@@ -3632,6 +3632,7 @@ export function IssueChatThread({
|
||||
errorBoundaryResetVersionRef.current += 1;
|
||||
}
|
||||
const errorBoundaryResetKey = String(errorBoundaryResetVersionRef.current);
|
||||
const shouldShowEmptyState = resolvedEmptyMessage.trim().length > 0;
|
||||
|
||||
return (
|
||||
<AssistantRuntimeProvider runtime={runtime}>
|
||||
@@ -3660,7 +3661,7 @@ export function IssueChatThread({
|
||||
data-testid="thread-viewport"
|
||||
className={variant === "embedded" ? "space-y-3" : "space-y-4"}
|
||||
>
|
||||
{messages.length === 0 ? (
|
||||
{messages.length === 0 && shouldShowEmptyState ? (
|
||||
<div className={cn(
|
||||
"text-center text-sm text-muted-foreground",
|
||||
variant === "embedded"
|
||||
|
||||
@@ -20,4 +20,11 @@ describe("company routes", () => {
|
||||
"/execution-workspaces/workspace-123",
|
||||
);
|
||||
});
|
||||
|
||||
it("treats conference room paths as board routes that need a company prefix", () => {
|
||||
expect(isBoardPathWithoutPrefix("/conference/history")).toBe(true);
|
||||
expect(extractCompanyPrefixFromPath("/conference/history")).toBeNull();
|
||||
expect(applyCompanyPrefix("/conference/history", "PAP")).toBe("/PAP/conference/history");
|
||||
expect(applyCompanyPrefix("/conference/PAP-1551", "PAP")).toBe("/PAP/conference/PAP-1551");
|
||||
});
|
||||
});
|
||||
@@ -17,6 +17,7 @@ const BOARD_ROUTE_ROOTS = new Set([
|
||||
"activity",
|
||||
"inbox",
|
||||
"u",
|
||||
"conference",
|
||||
"design-guide",
|
||||
]);
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ export function ConferenceRoom() {
|
||||
|
||||
return (
|
||||
<TooltipProvider>
|
||||
<div className="mx-auto flex h-[calc(100vh-8.5rem)] min-h-[560px] max-w-5xl flex-col overflow-hidden">
|
||||
<div className="flex h-[calc(100vh-8.5rem)] min-h-[560px] w-full max-w-5xl flex-col overflow-hidden">
|
||||
<div className="mb-3 flex h-11 shrink-0 items-center justify-between border-b border-border/80 bg-background">
|
||||
<div className="flex min-w-0 items-center gap-2">
|
||||
<span className="flex h-8 w-8 items-center justify-center rounded-md border border-border bg-muted/60">
|
||||
|
||||
Reference in new issue
Block a user