summaryrefslogtreecommitdiffhomepage
path: root/packages/frontend/src/lib/components/DebugPanel.svelte
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-01 11:28:52 +0900
committerAdam Malczewski <[email protected]>2026-06-01 11:28:52 +0900
commit03e58f69e77b7a27e235210158f3f8e499a817c3 (patch)
treedd64b3027dcb06cc62b413340a3dbf21423671b8 /packages/frontend/src/lib/components/DebugPanel.svelte
parentd3d94b69a9f98a0a4b68dc6ee830466471adf26d (diff)
parent76eb992577c084d9d9bba2fdf5e2c8317fd59bcd (diff)
downloaddispatch-03e58f69e77b7a27e235210158f3f8e499a817c3.tar.gz
dispatch-03e58f69e77b7a27e235210158f3f8e499a817c3.zip
Merge branch 'dev' into n2/ntfy-notifications
Brings in: theme picker consolidation, sidebar Debug panel, header declutter, a11y label on remove-panel button. Conflicts in SettingsPanel.svelte (theme picker insertion site overlaps the ntfy block) and HANDOFF.md (each branch maintains its own). # Conflicts: # HANDOFF.md
Diffstat (limited to 'packages/frontend/src/lib/components/DebugPanel.svelte')
-rw-r--r--packages/frontend/src/lib/components/DebugPanel.svelte35
1 files changed, 35 insertions, 0 deletions
diff --git a/packages/frontend/src/lib/components/DebugPanel.svelte b/packages/frontend/src/lib/components/DebugPanel.svelte
new file mode 100644
index 0000000..aea1ccb
--- /dev/null
+++ b/packages/frontend/src/lib/components/DebugPanel.svelte
@@ -0,0 +1,35 @@
+<script lang="ts">
+import { tabStore } from "../tabs.svelte.js";
+
+let copyLabel = $state("Copy conversation");
+
+function resetCopyLabel(): void {
+ copyLabel = "Copy conversation";
+}
+
+async function handleCopy(): Promise<void> {
+ const text = tabStore.copyConversation();
+ try {
+ await navigator.clipboard.writeText(text);
+ copyLabel = "Copied";
+ } catch {
+ copyLabel = "Failed";
+ }
+ setTimeout(resetCopyLabel, 1500);
+}
+</script>
+
+<div class="flex flex-col gap-3">
+ <div class="text-xs font-semibold text-base-content/50 uppercase tracking-wide">Debug</div>
+
+ <div class="flex flex-col gap-2">
+ <p class="text-xs text-base-content/70">Conversation</p>
+ <p class="text-xs text-base-content/40">
+ Copy a structured plain-text dump of the active tab's conversation
+ (chunk shape included) for bug reports.
+ </p>
+ <button type="button" class="btn btn-sm btn-primary w-full" onclick={handleCopy}>
+ {copyLabel}
+ </button>
+ </div>
+</div>