Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.8] - 2026-06-15

### Fixed

- 💬 **Clicking chats now opens them instantly.** Tapping a chat in the sidebar, clicking "View Chat" on an automation run, or following a notification toast now takes you straight to the conversation. Previously these actions could sometimes get stuck or fail to switch to the right chat.

## [0.4.7] - 2026-06-15

### Fixed
Expand Down
21 changes: 1 addition & 20 deletions cptr/frontend/src/lib/components/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
appVersion,
showChangelog,
showSearch,
openChatTab,
setActiveTab
} from '$lib/stores';
import { get } from 'svelte/store';
import Sortable from 'sortablejs';
import Icon from './Icon.svelte';
import KeyPill from './KeyPill.svelte';
Expand Down Expand Up @@ -106,23 +103,7 @@
}

function handleShowMoreChats(wsPath: string) {
goto(`/?workspace=${encodeURIComponent(wsPath)}`);

const ws = get(currentWorkspace);
if (ws) {
for (const group of ws.groups) {
const existing = group.tabs.find(
(t) => t.type === 'chat' && (t.path?.startsWith('new-') || t.path?.startsWith('pending-'))
);
if (existing) {
setActiveTab(existing.id, group.id);
if (typeof window !== 'undefined' && window.innerWidth < 768) sidebarOpen.set(false);
return;
}
}
}

openChatTab();
goto(`/?workspace=${encodeURIComponent(wsPath)}&chatId`);
if (typeof window !== 'undefined' && window.innerWidth < 768) {
sidebarOpen.set(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import ToggleSwitch from '../common/ToggleSwitch.svelte';
import Spinner from '../common/Spinner.svelte';
import AutomationModal from './AutomationModal.svelte';
import { openChatTab, sidebarOpen } from '$lib/stores';
import { sidebarOpen } from '$lib/stores';
import {
getAutomations,
toggleAutomation,
Expand Down Expand Up @@ -335,10 +335,8 @@
class="text-[11px] text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors duration-75"
onclick={() => {
const ws = detail?.workspace;
if (ws) {
goto(`/?workspace=${encodeURIComponent(ws)}`);
}
setTimeout(() => openChatTab(run.chat_id!), 300);
const wsParam = ws ? `workspace=${encodeURIComponent(ws)}&` : '';
goto(`/?${wsParam}chatId=${encodeURIComponent(run.chat_id!)}`);
}}
>
{$t('automations.viewChat')}
Expand Down
14 changes: 4 additions & 10 deletions cptr/frontend/src/lib/stores/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { writable, get } from 'svelte/store';
import { toast } from 'svelte-sonner';
import { fetchJSON } from '$lib/apis';
import { socketStore } from '$lib/stores/socket.svelte';
import { activeTab, openChatTab } from '$lib/stores';
import { activeTab } from '$lib/stores';

export const chatEnabled = writable<boolean>(false);

Expand Down Expand Up @@ -103,15 +103,9 @@ export function bindGlobalChatListener() {
title,
content: body,
onClick: async () => {
// Navigate to workspace page first if not already there
const wsPath = data.workspace;
if (wsPath && window.location.pathname !== '/') {
const { goto } = await import('$app/navigation');
await goto(`/?workspace=${encodeURIComponent(wsPath)}`);
setTimeout(() => openChatTab(chatId), 300);
} else {
openChatTab(chatId);
}
const { goto } = await import('$app/navigation');
const wsParam = data.workspace ? `workspace=${encodeURIComponent(data.workspace)}&` : '';
await goto(`/?${wsParam}chatId=${encodeURIComponent(chatId)}`);
toast.dismiss(toastId);
},
onclose: () => {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cptr"
version = "0.4.7"
version = "0.4.8"
description = "Your computer, from anywhere. Code, manage, and control your machine from the web."
license = {file = "LICENSE"}
readme = "README.md"
Expand Down
Loading