Skip to content

feat: tech debt, prompt optimization, and stability fixes - #3

Merged
ojfbot merged 5 commits into
mainfrom
feat/techdebt-integration
Mar 26, 2026
Merged

feat: tech debt, prompt optimization, and stability fixes#3
ojfbot merged 5 commits into
mainfrom
feat/techdebt-integration

Conversation

@ojfbot

@ojfbot ojfbot commented Mar 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove automatic LLM calls: Delete scheduleRegroup() and all chrome.tabs.on* listeners. LLM calls now fire only on explicit user action (Refresh button, specificity slider, chat). Remove blocking captureVisibleTab from get-tabs — tabs return instantly.
  • Optimize prompts: Rewrite system prompt from ~600 to ~200 words. Compact tab serialization format. Per-method max_tokens (4096/1024/2048) instead of a blanket value. Sweep/refine skip tabDescriptions/tabTags to reduce output tokens.
  • Fix config race condition: Storage.getConfig() uses DEFAULT_CONFIG as fallback. get-config handler auto-populates API key from ENV_CONFIG if storage is empty, eliminating race with onInstalled.
  • Fix treemap black screen: Clicking a child-group tile in an unfocused sidebar group no longer crashes the layout — navigates to the parent group instead.

Test plan

  • Reload extension — shows cached grouping instantly, no spinner delay
  • Open/close tabs — no LLM calls fire (check service worker console)
  • Click Refresh — LLM call fires, chaos cloud → treemap transition is smooth
  • Click unfocused sidebar group — switches focus cleanly, no black screen
  • Chat refinement + focus hints still work
  • Fresh install auto-configures API key from env.json

🤖 Generated with Claude Code

ojfbot and others added 5 commits March 25, 2026 19:37
Delete scheduleRegroup() and all chrome.tabs.on* listeners that fired
LLM calls on every tab create/remove/URL change. Remove silent
doGrouping on app mount and dead storage.onChanged listener. LLM calls
now fire only on explicit user action (Refresh, slider, chat).

Also remove blocking captureVisibleTab from get-tabs handler — tabs
return instantly instead of waiting for per-window screenshot capture.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite SYSTEM_PROMPT from ~600 to ~200 words — dense numbered rules,
no redundancy. Compact tab serialization (id|title|host/path). Sweep
and refine prompts skip tabDescriptions/tabTags to save output tokens.

Set per-method max_tokens: groupTabs 4096, sweep 1024, refine 2048.
Reorder model options: Sonnet (recommended), Haiku (cheapest), Opus.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Storage.getConfig() now falls back to DEFAULT_CONFIG (includes
contextEnrichment). get-config handler auto-populates API key from
ENV_CONFIG if storage is empty, eliminating race with onInstalled.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clicking a child-group tile in a sidebar/unfocused group passed the
child ID as focusedGroupId, which doesn't exist as a top-level group,
producing an empty layout. Now detects sibling-group children and
navigates to the parent group instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ojfbot
ojfbot merged commit 6f94eac into main Mar 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant