fix(kon): float window sidebar, transcription doubling guard, branding

Float window fixes:
- Root layout now detects /float and /viewer URLs and hides Sidebar,
  Titlebar, TaskSidebar for secondary windows. Belt-and-braces fix
  since +layout@.svelte should handle this but may not in SPA mode.
- Float window title: "Ramble - To-do" → "Kon - To-do"

Transcription doubling guard:
- Added chunk_id deduplication set in DictationPage — if a chunk_id
  has already been processed, skip the duplicate result
- Set cleared on each new recording session

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
jake
2026-03-16 23:07:30 +00:00
parent c463293935
commit 1ad2b55d9c
7 changed files with 146 additions and 14 deletions

View File

@@ -34,3 +34,4 @@ serde_json = "1"
# Async runtime (spawn_blocking for inference)
tokio = { version = "1", features = ["rt", "sync"] }
arboard = "3.6.1"
tauri-plugin-mcp = "0.7.1"

File diff suppressed because one or more lines are too long

View File

@@ -2444,6 +2444,60 @@
"const": "global-shortcut:deny-unregister-all",
"markdownDescription": "Denies the unregister_all command without any pre-configured scope."
},
{
"description": "This permission set configures what kind of\noperations are available from the mcp plugin.\n\n#### Granted Permissions\n\nAll operations are enabled by default.\n\n#### This default permission set includes:\n\n- `allow-connect-server`\n- `allow-disconnect-server`\n- `allow-list-tools`\n- `allow-call-tool`",
"type": "string",
"const": "mcp:default",
"markdownDescription": "This permission set configures what kind of\noperations are available from the mcp plugin.\n\n#### Granted Permissions\n\nAll operations are enabled by default.\n\n#### This default permission set includes:\n\n- `allow-connect-server`\n- `allow-disconnect-server`\n- `allow-list-tools`\n- `allow-call-tool`"
},
{
"description": "Enables the call_tool command without any pre-configured scope.",
"type": "string",
"const": "mcp:allow-call-tool",
"markdownDescription": "Enables the call_tool command without any pre-configured scope."
},
{
"description": "Enables the connect_server command without any pre-configured scope.",
"type": "string",
"const": "mcp:allow-connect-server",
"markdownDescription": "Enables the connect_server command without any pre-configured scope."
},
{
"description": "Enables the disconnect_server command without any pre-configured scope.",
"type": "string",
"const": "mcp:allow-disconnect-server",
"markdownDescription": "Enables the disconnect_server command without any pre-configured scope."
},
{
"description": "Enables the list_tools command without any pre-configured scope.",
"type": "string",
"const": "mcp:allow-list-tools",
"markdownDescription": "Enables the list_tools command without any pre-configured scope."
},
{
"description": "Denies the call_tool command without any pre-configured scope.",
"type": "string",
"const": "mcp:deny-call-tool",
"markdownDescription": "Denies the call_tool command without any pre-configured scope."
},
{
"description": "Denies the connect_server command without any pre-configured scope.",
"type": "string",
"const": "mcp:deny-connect-server",
"markdownDescription": "Denies the connect_server command without any pre-configured scope."
},
{
"description": "Denies the disconnect_server command without any pre-configured scope.",
"type": "string",
"const": "mcp:deny-disconnect-server",
"markdownDescription": "Denies the disconnect_server command without any pre-configured scope."
},
{
"description": "Denies the list_tools command without any pre-configured scope.",
"type": "string",
"const": "mcp:deny-list-tools",
"markdownDescription": "Denies the list_tools command without any pre-configured scope."
},
{
"description": "This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer\n#### This default permission set includes:\n\n- `allow-open-url`\n- `allow-reveal-item-in-dir`\n- `allow-default-urls`",
"type": "string",

View File

@@ -2444,6 +2444,60 @@
"const": "global-shortcut:deny-unregister-all",
"markdownDescription": "Denies the unregister_all command without any pre-configured scope."
},
{
"description": "This permission set configures what kind of\noperations are available from the mcp plugin.\n\n#### Granted Permissions\n\nAll operations are enabled by default.\n\n#### This default permission set includes:\n\n- `allow-connect-server`\n- `allow-disconnect-server`\n- `allow-list-tools`\n- `allow-call-tool`",
"type": "string",
"const": "mcp:default",
"markdownDescription": "This permission set configures what kind of\noperations are available from the mcp plugin.\n\n#### Granted Permissions\n\nAll operations are enabled by default.\n\n#### This default permission set includes:\n\n- `allow-connect-server`\n- `allow-disconnect-server`\n- `allow-list-tools`\n- `allow-call-tool`"
},
{
"description": "Enables the call_tool command without any pre-configured scope.",
"type": "string",
"const": "mcp:allow-call-tool",
"markdownDescription": "Enables the call_tool command without any pre-configured scope."
},
{
"description": "Enables the connect_server command without any pre-configured scope.",
"type": "string",
"const": "mcp:allow-connect-server",
"markdownDescription": "Enables the connect_server command without any pre-configured scope."
},
{
"description": "Enables the disconnect_server command without any pre-configured scope.",
"type": "string",
"const": "mcp:allow-disconnect-server",
"markdownDescription": "Enables the disconnect_server command without any pre-configured scope."
},
{
"description": "Enables the list_tools command without any pre-configured scope.",
"type": "string",
"const": "mcp:allow-list-tools",
"markdownDescription": "Enables the list_tools command without any pre-configured scope."
},
{
"description": "Denies the call_tool command without any pre-configured scope.",
"type": "string",
"const": "mcp:deny-call-tool",
"markdownDescription": "Denies the call_tool command without any pre-configured scope."
},
{
"description": "Denies the connect_server command without any pre-configured scope.",
"type": "string",
"const": "mcp:deny-connect-server",
"markdownDescription": "Denies the connect_server command without any pre-configured scope."
},
{
"description": "Denies the disconnect_server command without any pre-configured scope.",
"type": "string",
"const": "mcp:deny-disconnect-server",
"markdownDescription": "Denies the disconnect_server command without any pre-configured scope."
},
{
"description": "Denies the list_tools command without any pre-configured scope.",
"type": "string",
"const": "mcp:deny-list-tools",
"markdownDescription": "Denies the list_tools command without any pre-configured scope."
},
{
"description": "This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer\n#### This default permission set includes:\n\n- `allow-open-url`\n- `allow-reveal-item-in-dir`\n- `allow-default-urls`",
"type": "string",

View File

@@ -34,6 +34,9 @@
let activeTemplate = $state("");
let showTemplateMenu = $state(false);
// Deduplication: track which chunk IDs have been processed
let processedChunks = new Set();
// AudioWorklet state
let audioContext = null;
let workletNode = null;
@@ -79,6 +82,11 @@
function handleResult(result) {
if (result.status === "transcription" && result.segments) {
// Deduplication guard: skip if this chunk_id was already processed
if (result.chunk_id != null && processedChunks.has(result.chunk_id)) {
return;
}
if (result.chunk_id != null) processedChunks.add(result.chunk_id);
const text = result.segments.map((s) => s.text).join(" ").trim();
if (text) {
if (insertPos >= 0) {
@@ -214,6 +222,7 @@
pcmBuffer = [];
chunkId = 0;
chunkTimeOffset = 0;
processedChunks.clear();
// Only clear transcript if not in insert mode (fresh recording)
if (insertPos === -1) {

View File

@@ -7,8 +7,17 @@
import Titlebar from "$lib/components/Titlebar.svelte";
import { page, settings } from "$lib/stores/page.svelte.js";
import { page as sveltePage } from "$app/stores";
let { children } = $props();
// Detect secondary windows (float, viewer) — they use +layout@.svelte
// but as a fallback, hide chrome if the URL matches
let isSecondaryWindow = $derived(
$sveltePage.url.pathname.startsWith("/float") ||
$sveltePage.url.pathname.startsWith("/viewer")
);
// Recording indicator dot (follows mouse)
let mouseX = $state(0);
let mouseY = $state(0);
@@ -98,6 +107,10 @@
></div>
{/if}
{#if isSecondaryWindow}
<!-- Secondary windows (float, viewer) render children only — no shell chrome -->
{@render children()}
{:else}
<div class="flex flex-col h-screen w-screen overflow-hidden grain">
<Titlebar />
<div class="flex flex-1 min-h-0">
@@ -112,3 +125,4 @@
{/if}
</div>
</div>
{/if}

View File

@@ -168,7 +168,7 @@
data-tauri-drag-region
>
<span class="text-[12px] font-medium text-text-secondary tracking-wide" data-tauri-drag-region>
Ramble - To-do
Kon - To-do
</span>
<div class="flex-1" data-tauri-drag-region></div>