Skip to content

Improvements to the chat panel for consideration#97

Open
Midway65 wants to merge 95 commits into
ProfSynapse:mainfrom
Midway65:my-custom-branch
Open

Improvements to the chat panel for consideration#97
Midway65 wants to merge 95 commits into
ProfSynapse:mainfrom
Midway65:my-custom-branch

Conversation

@Midway65
Copy link
Copy Markdown

@Midway65 Midway65 commented Apr 6, 2026

Chat Window Improvements — Bug Fixes & New Features


Overview

All changes below are scoped to the chat window UI, its supporting components, and the CSS that governs it. No changes to the AI/LLM pipeline, embeddings, MCP, or schema migrations are included. Every change is a self-contained fix or a discrete new feature — no architectural rewrites.


1. New Feature: Chat Action Buttons

Commits: 72abed8, 176db1e, cf8dc23, 85ea19b, 0222bdb, 87d8bb2, 1a01897, 938e6c3, e948c79, c56b166, c7eb50be
Files changed: MessageActionBar.ts (new), CreateFileModal.ts (new), MessageBubble.ts, ToolBubbleFactory.ts, MessageDisplay.ts, styles.css

What was added

A MessageActionBar component with four action buttons appears on every completed AI message:

Button Action
Copy Copies message text to clipboard
Insert Inserts text at cursor position in the active note
Append Appends text to the end of the active note
Create File Opens a modal to save the message as a new note

The existing copy button that was embedded inside the message bubble header was removed and replaced by the Copy button in the action bar.

Placement and visual design

  • The action buttons live inside the existing .message-actions-external pill in the message header top-right, next to the bot icon. No new container elements were added.
  • The pill rests at 25% opacity and animates to full opacity on hover — a consistent affordance with the existing branch navigator pill.
  • On mobile the resting opacity is 75%.
  • Transition reduced from 0.2 s to 0.1 s to reduce repaint churn during text-selection drag operations.

Create File modal

  • Default save folder: 00-Inbox
  • Toggle "Open after create" is read via getValue() at create time (not from a cached class field) to ensure the user's choice is always respected.
  • Folder picker, filename field, and open-after-save toggle.

Bugs found and fixed during implementation

Click-blocking (invisible pill intercepting mouse events)
The pill had opacity:0 but no pointer-events:none. It sat at z-index:20 above message content, silently swallowing all mouse clicks — text selection was broken for every message. Fixed by adding pointer-events:none to the hidden state and pointer-events:auto to all visible states.

Text not selectable
Obsidian's Electron shell applies user-select:none globally. Without an explicit override, message text could not be selected. Fixed by adding user-select:text; cursor:text to .message-content.

Insert/Append silently doing nothing
getActiveViewOfType(MarkdownView) returns null when the chat panel is the active workspace view — even if a note is open beside it. Fixed with a getMarkdownView() helper that falls back to getLeavesOfType('markdown') so the buttons work regardless of which panel last received focus. Also added editor.focus() before replaceSelection so the cursor becomes visible after insertion.

Insert/Append stealing editor focus
Clicking the buttons shifted focus from the active note to the chat panel button, causing getActiveViewOfType(MarkdownView) to return null on the very click that triggered the action. Fixed by calling event.preventDefault() on mousedown for Insert and Append, preserving editor focus through the click.

Copy returning wrong content on branched messages
When a user had retried a message, onCopyMessage read message.content directly — which always holds the most-recently-streamed response. Copying an earlier branch returned the latest branch's text instead. Fixed by reading through branchManager.getActiveMessageContent() so Copy always returns the currently displayed page.


2. Bug Fix: Chat Input Auto-Resize (BUG-01)

Commit: d6368d7
File: ChatInput.ts

Problem

The chat input box shrank unexpectedly while typing multi-line messages.

Root cause

The JavaScript auto-resize logic used minHeight/maxHeight values (48 px / 120 px) that did not match the CSS-defined values (72 px / 200 px). The height measurement also used a class-toggle approach that produced unreliable scrollHeight readings on contenteditable elements.

Fix

  • minHeight corrected to 72 px (desktop) and 64 px (mobile) to match CSS.
  • maxHeight corrected to 200 px (desktop) and 160 px (mobile) to match CSS.
  • Height measurement now uses style.removeProperty() to temporarily remove the height constraint and read the natural scrollHeight, then restores it — the standard reliable pattern for contenteditable auto-resize.

3. Bug Fix: Tool Accordion Layout Thrashing (BUG-02)

Commit: 4aebd25
File: ProgressiveToolAccordion.ts

Problem

When an AI response included tool calls, the tool execution accordion re-formatted and shifted position on every status update, making it difficult to read while the tool was still running.

Root cause

refresh() called content.empty() and completely re-rendered all steps on every update — a full DOM teardown-and-rebuild on every streaming token.

Fix

Replaced full rebuild with targeted in-place DOM reconciliation:

  • Existing step elements are updated in place (status class, text, meta, result).
  • New steps are appended only when first seen.
  • Reasoning items follow the same pattern.

This eliminates layout thrashing during active tool execution.


4. Bug Fix: Sticky Message Header for Long Responses (part of 8059edbc)

File: styles.css

Problem

On long AI responses, the action buttons (Copy, Insert, Append, Create File) scroll off-screen with the message header, making them inaccessible without scrolling back up.

Fix

The assistant message header is now position:sticky; top:0 within the scroll pane. The header — and its action buttons — remain visible at the top of the viewport as the user scrolls through a long message.


5. Bug Fix: Chat Header Title After Last Conversation Deleted (af70463f)

File: ChatView.ts

Problem

When the user deleted their last conversation, the welcome/empty state was shown correctly, but the header title continued to display the name of the deleted conversation instead of resetting to "Chat".

Fix

Added title reset to 'Chat' in both handleConversationsChanged() and loadInitialData() at the point where conversations.length === 0 triggers the welcome state.


6. Bug Fix: Beta Warning Banner Removed (607ec58)

Files: ChatLayoutBuilder.ts, styles.css

What changed

The experimental/beta warning banner that appeared at the top of the chat panel on every open was removed. Deleted: createWarningBanner(), its call site, and all associated CSS classes (.chat-experimental-warning, .chat-warning-banner-fadeout). Settings-tab warning styles were left untouched.

Rationale

The warning was more distracting than informative for a plugin in daily stable use.


7. Bug Fix: Context Bar Stale After Tab Switch (11f90913)

File: ChatView.ts

Problem

The context bar (showing the current note/file context) did not refresh when the user switched to a different tab and back. The displayed context could be stale.

Fix

Registered an active-leaf-change event listener so the context bar refreshes whenever the chat tab comes into focus.


8. Bug Fix: Conversation List — Rename Input & Cleanup Timer (F-01, dd65f6bb)

File: ConversationList.ts

Two fixes:

  1. Timer leak on panel close: cleanup() now calls clearPendingDeleteConversation(), ensuring the 5-second "undo delete" confirmation timer is cancelled if the panel closes during the window.

  2. DOM API consistency: showRenameInput() replaced two document.createElement calls with Obsidian's createEl API, consistent with the rest of the component.


9. Bug Fix: Branch Header Unnecessary Re-renders (F-02, 0b2c719f)

File: BranchHeader.ts

Problem

update() called render() unconditionally on hot iteration paths (e.g., streaming updates), causing unbounded registerDomEvent accumulation in the component's event registry.

Fix

Added a JSON equality check — render() is skipped if the context object is identical to the previous render's context.


10. Bug Fix: Loading Animation Interval Leak (F-03, 3c928fa1)

File: MessageBubble.ts

Problem

startLoadingAnimation() could be called twice during a streaming message (once on start, once on an update). The second call set a new interval without clearing the first, leaking the original interval for the remainder of the message.

Fix

startLoadingAnimation() now calls clearInterval(this.loadingInterval) before setting a new interval.


11. Bug Fix: Context Progress Bar API Idiom (F-05, 2a2a80fd)

File: ContextProgressBar.ts

Replaced direct className = '...' assignment with removeAttribute('class') + addClass(), consistent with Obsidian component conventions and avoiding accidental class clobbering.


12. Bug Fix: Conversation List Truncated at 50 (F-06, b436816c)

File: ConversationManager.ts

Problem

listConversations({ limit: 50 }) silently truncated users with more than 50 conversations — conversations existed in the database but were invisible in the UI.

Fix

Raised the limit from 50 to 500.


13. Bug Fix: Image Model Setting Not Saved (F-07, 9df51022)

File: ChatSettingsModal.ts

Problem

The per-chat settings modal has a section for selecting an image provider and model. On save, defaultImageModel was never written back to plugin settings — the selection was silently discarded on every close.

Fix

handleSave() now writes defaultImageModel to plugin.settings and calls saveSettings() after updating all other fields.


14. Bug Fix: Hardcoded OpenAI/GPT-4o Model Fallback (F-08, b9ef14c6)

File: ModelSelectionUtility.ts

Problem

When no configured default model existed, the utility returned { provider: 'openai', model: 'gpt-4o' }. For users who had not configured OpenAI (e.g., Anthropic-only or Ollama-only setups), this silently selected an unavailable model.

Fix

Returns an empty sentinel { provider: '', model: '' } instead. Callers already guard on truthiness, so no caller changes were needed.


15. Dead Code Removal (BUG-04 + F-04)

Commits: 7e26b3b, 295969cf
Files: ChatView.ts, MessageDisplay.ts, StreamingController.ts

  • Removed dead isRetry variable from handleStreamingUpdate() in ChatView.ts. It was computed but never used — retry logic is fully handled by MessageAlternativeService.
  • Removed never-called private escapeHtml() from MessageDisplay.ts.
  • Removed never-called private escapeHtml() from StreamingController.ts.

16. CSS Cleanup (F-10, 49a6e711, 4e879636)

File: styles.css

Consolidated and removed orphaned CSS across the chat window:

Item Change
E08-1 Consolidated duplicate .chat-settings-modal rules
E08-2 Renamed .chat-settings-button-container.chat-settings-buttons to match TypeScript usage
E08-3 Deleted orphaned .chat-settings-section rule
E08-4 Deleted orphaned pre-refactor block: .workspace-info-section, .workspace-context-summary, .context-item, and children
E08-5 Deleted four orphaned context-notes-* / add-context-note-container rules (replaced by csr-notes-*)
E08-6 Added missing .csr-temp-value rule — used in ChatSettingsRenderer.ts but had no CSS definition; temperature span was unstyled
E08-7 Merged duplicate .llm-provider-model-row into single rule
Mobile Merged two duplicate body.is-mobile .message-actions-external blocks; corrected stale comment
Copy animation Added transform 0.1s ease to .message-action-btn transition so the copy-success scale(1.1) animates instead of snapping

Summary Table

# Commit(s) Category User-visible impact
1 72abed8c7eb50be New feature Copy, Insert, Append, Create File buttons on every AI message
2 d6368d7 Bug fix Input box no longer shrinks while typing multi-line messages
3 4aebd25 Bug fix Tool accordion no longer jumps/shifts during streaming
4 8059edbc (CSS only) Enhancement Action buttons stay visible while scrolling long messages
5 af70463f Bug fix Header title resets to "Chat" after last conversation deleted
6 607ec58 UX removal Beta warning banner no longer shown on every chat open
7 11f90913 Bug fix Context bar updates correctly when returning to chat tab
8 dd65f6bb Bug fix Rename inputs use correct API; delete timer cleaned up on close
9 0b2c719f Performance Branch header skips redundant re-renders
10 3c928fa1 Bug fix Loading animation interval no longer leaks during streaming
11 2a2a80fd Code quality Context progress bar uses correct Obsidian API idiom
12 b436816c Bug fix All conversations visible (was silently capped at 50)
13 9df51022 Bug fix Image model selection is now actually saved
14 b9ef14c6 Bug fix No longer falls back to OpenAI/GPT-4o when not configured
15 7e26b3b, 295969cf Dead code Removed unused variables and methods
16 49a6e711, 4e879636 CSS Orphaned rules removed; missing rule added; copy animation smoothed

Midway65 and others added 30 commits April 3, 2026 20:49
- minHeight 48→72px (desktop) and 64px (mobile) to match CSS values
- maxHeight 120→200px (desktop) and 160px (mobile) to match CSS values
- Replace class-toggle height measurement with style.removeProperty()
  for reliable scrollHeight reads on contenteditable divs

Fixes BUG-01: input box shrinking unexpectedly while typing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Instead of calling content.empty() and re-rendering all steps on every
refresh(), reconcile existing DOM elements with current state:
- Existing steps are updated in place (status class, text, meta, result)
- New steps are appended only when first seen
- Reasoning items follow the same pattern

Eliminates layout thrashing during active tool execution.

Fixes BUG-02: accordion formatting shifting on every update.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The variable was computed but never used. Retry functionality is fully
handled by MessageAlternativeService — this was leftover from a planned
but unimplemented streaming differentiation path.

Fixes BUG-04.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removed the experimental/beta warning banner that appeared on every
chat open. The chat window is stable enough for daily use and the
warning was more distracting than informative.

Removed: createWarningBanner() method, its call site, all associated
CSS classes (.chat-experimental-warning and children,
.chat-warning-banner-fadeout). Settings-tab warning styles untouched.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a MessageActionBar pill below every completed AI message that has
text content. Moves the copy action out of the bubble header and into
the pill alongside Insert at cursor, Append to active note, and Create
new file. CreateFileModal handles naming, folder selection (default
00-inbox), and optional open-after-save. Pill fades to 35% opacity at
rest and full opacity on hover.

- src/ui/chat/components/CreateFileModal.ts (new)
- src/ui/chat/components/MessageActionBar.ts (new)
- src/ui/chat/components/MessageBubble.ts — appendActionBar, cleanupActionBar, remove header copy button for assistant messages
- src/ui/chat/components/factories/ToolBubbleFactory.ts — remove copy button from createTextBubble, drop onCopy/showCopyFeedback params
- styles.css — message-action-bar and message-action-bar-btn styles

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
onMessageAlternativeChanged and component were only used by the copy
button logic that was removed in the previous commit. Stale header
comment in MessageBubble also updated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Satisfies @typescript-eslint/no-unused-vars. Parameter was never used
in the function body even before this feature — only surfaced now.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The .message-actions-external pill had opacity:0 but no
pointer-events:none, causing it to silently intercept all mouse
clicks over message content. Text selection was broken because the
invisible pill sat above the content in the stacking context (z-index
20). Added pointer-events:none to the hidden state and
pointer-events:auto to all visible states (hover, mobile, media
queries).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The separate bottom pill (message-action-bar) was wrong placement and
left the message-actions-external div empty. An empty sticky/z-20
element with no pointer-events:none silently blocked all mouse clicks
on message content, breaking text selection.

Fix:
- MessageActionBar.renderInto(el) populates the existing upper-right
  .message-actions-external pill instead of creating a new element
- MessageActionBar.removeFromContainer() cleans up on rebuild/destroy
- appendActionBar() queries .message-actions-external within the
  container rather than appending a new child after the bubble
- Removed .message-action-bar CSS block (no longer needed)
- pointer-events:none already in place for the hidden pill state

All 4 buttons (Copy, Insert, Append, Create File) now appear in the
familiar upper-right corner pill alongside the branch navigator.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…city

Two fixes:
1. .message-content now explicitly sets user-select:text and cursor:text.
   Obsidian's Electron shell applies user-select:none globally; without
   an explicit override the content was not text-selectable. Child
   elements (links, buttons) retain their own cursor/pointer-events.

2. .message-actions-external resting opacity changed from 0 to 0.25 so
   the pill is always visible as a subtle affordance, becoming fully
   opaque on hover. Removed stale transform from hover rule.
   Mobile resting opacity set to 0.75 (was 0.85).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pill was sitting inside the bubble with sticky+float positioning, leaving
it detached from the header and occasionally blocking layout. Moved it
into .message-header for both the standard path (MessageBubble) and the
group path (ToolBubbleFactory). The header's justify-content:space-between
naturally places the bot icon left and the pill right with no extra CSS.

Also reduced pill transition from 0.2s to 0.1s to reduce repaint churn
during text selection drag operations. Removed stale z-index and mobile
top/right overrides that no longer apply.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Clicking Insert or Append shifted focus from the active note to the
chat panel button, causing getActiveViewOfType(MarkdownView) to return
null and silently doing nothing. Added mousedown:preventDefault on both
buttons so editor focus and cursor position are preserved through the
click. Also added user-visible Notice for the no-active-note case.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
getActiveViewOfType(MarkdownView) returns null whenever the chat panel
is the active workspace view, even if a note is open alongside it.
Added getMarkdownView() helper that falls back to getLeavesOfType
('markdown') so Insert and Append work regardless of which panel last
received focus. Also added editor.focus() before replaceSelection so
the cursor is visible after insertion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Default folder was '00-inbox' — corrected to '00-Inbox'. Toggle value
was read from a class field updated via onChange, but close() runs
before the check and could leave state stale. Fix: store the
ToggleComponent ref and call getValue() at create time instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Prevents Obsidian from auto-updating this fork if/when the upstream
ProfSynapse/nexus repo is accepted into the community plugins registry.
Obsidian matches plugins by id — "nucleus" will never match "nexus".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Upstream changes:
- VaultIngestionManager: moved drag-and-drop ingest UI out of ChatView into
  dedicated VaultIngestionManager (src/core/ingest/VaultIngestionManager.ts)
- PdfJsLoader: new lazy-loader for pdfjs-dist to improve startup performance
- ChatView/ChatLayoutBuilder: removed inline ingest UI (now in VaultIngestionManager)
- DefaultsTab: new ingestion settings fields
- PdfPageRenderer/PdfTextExtractor: bug fixes and improvements
- types.ts / PluginTypes.ts: new enableIngestion flag support

Conflict resolutions:
- manifest.json: kept id=nucleus/name=Nucleus, took upstream version=5.6.2
- ChatView.ts: took upstream (removed inline ingest imports and methods);
  our action buttons and beta-banner-removal changes are in separate sections
  and were auto-merged cleanly by git
- ChatLayoutBuilder.ts: auto-resolved cleanly by git

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reverts the nucleus rename — it caused the chat plugin to stop
functioning. Plugin identity restored to id=nexus/name=Nexus.
Version remains 5.6.2 (from the upstream merge).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
DOCX, PPTX, XLSX ingestion support. New services: DocxExtractionService,
PptxExtractionService, SpreadsheetExtractionService. VaultIngestionManager
updated for multi-output paths and xlsx null guard. Version bump 5.6.2→5.6.3.

Conflicts resolved: CLAUDE.md, manifest.json, package.json (version bumps —
took upstream), connectorContent.ts (kept our newer timestamp),
ChatView.ts ×4 (whitespace only — took upstream),
VaultIngestionManager.ts ×3 (new logic — took upstream).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
any→unknown type migration, ESLint v9 + obsidianmd linter.
Resolved 6 conflicts: kept our actionBar additions, beta banner
deletion, copy button removal; took upstream type safety changes
and two new type imports. Fixed 2 new lint errors in our files:
no-misused-promises in MessageActionBar, no-unnecessary-type-assertion
and sentence-case in ProgressiveToolAccordion.
…384-dim model

note_embeddings and block_embeddings vec0 tables were created with float[768]
from an older embedding model. Current model (TaylorAI/bge-micro-v2) produces
384-dim vectors. Drops and recreates both tables, clears associated metadata.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
vec0 virtual table DROP/CREATE cannot run via prepare().step() in the
DatabaseAdapter. Migration v12 is now a version marker only; the actual
fix runs in SQLiteCacheManager.fixVec0TableDimensions() using the raw
WASM db.exec(), matching the same path used by clearAllData().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…config (v17)

- CURRENT_SCHEMA_VERSION bumped 12 → 17
- Stubs v13-v16: acknowledge prior local-fixes fork era (Nomic pipeline,
  semantic panel, block embeddings) so version comparison stays accurate
- Migration v17: DROP TABLE IF EXISTS embedding_config — orphaned table
  from old Nomic era; our fork never reads or writes it

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…dimension column

The old local-fixes fork added a `dimension INTEGER NOT NULL` column to
embedding_metadata between its v13-v16 migrations. That fork's strip
commit would have removed it (at its v12/v13), but the live DB was already
at v16 so the strip never ran. Our NoteEmbeddingService inserts without
the dimension column, causing NOT NULL constraint failures on every note
embedding attempt.

Fix: drop and recreate embedding_metadata with the clean schema (no
dimension column). Cache data is expendable — notes will be re-indexed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Merged two body.is-mobile .message-actions-external blocks into one;
  updated stale comment (pill is in header, not below message)
- Added transform 0.1s ease to .message-action-btn transition so the
  copy-success scale(1.1) animates instead of snapping

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
No file in the codebase imports or uses ContentProcessor.
Confirmed via full-repo grep across all .ts and .js files.
Build and lint pass with zero errors after removal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove sonar-reasoning (deprecated Dec 15 2025) from PERPLEXITY_MODELS
- Remove r1-1776 (removed Aug 1 2025) from PERPLEXITY_MODELS
- Remove PERPLEXITY_OFFLINE_MODELS export (no offline models remain)
- Simplify PERPLEXITY_SEARCH_MODELS to full model list (all models have search)
- Add 'minimal' to PerplexityOptions.reasoningEffort type
- Add 'sec' to PerplexityOptions.searchMode type
- Mirror new literals in PerplexityRequestBody.extra types

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove extra wrapper; all search params now top-level per API spec
- Add full search param set: search_recency_filter, search_domain_filter,
  search_after/before_date_filter, last_updated_after/before_filter,
  enable_search_classifier, disable_search, return_related_questions,
  return_images, search_language_filter, language_preference
- Add web_search_options.search_type
- Gate reasoning_effort and stream_mode to sonar-reasoning-pro only
- Remove presence_penalty and frequency_penalty (not in Perplexity API spec)
- Remove convertTools(), PerplexityToolDefinition, and tools field
  (Perplexity has no function calling)
- Add stripUndefined() to keep serialised body clean
- Extend PerplexityOptions with all new params

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Midway65 and others added 3 commits April 6, 2026 18:27
…ntext

Context is now derived from the getWorkspaceBasic() call already inside the
method — the caller no longer needs to fetch the workspace first. ChatSettingsModal
passes only the workspaceId; no upstream name change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1. setWorkspaceContext — pendingFullWorkspaceLoad now set only when
   getWorkspaceBasic returns a workspace, not unconditionally before
   the fetch. Prevents a wasted loadWorkspace call on first message
   when the workspace ID is not found in DB.

2. buildSystemPromptWithWorkspace — stop passing workspaceContext to
   SystemPromptBuilder.build(); the field is not consumed by any section
   builder after the slim-header refactor. Field kept in SystemPromptOptions
   for upstream interface compatibility.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ChatView.performFullInitialization() was calling getMessageOptions() at
line 298 to read the provider for a pre-load hint. This fired the G-W3
block prematurely — loading full workspace data, clearing loadedWorkspaceData,
and setting pendingFullWorkspaceLoad=false — before the user sent any message.
First message after workspace restore therefore always received slim header only.

Replace with getSelectedModel()?.providerId — sync, no side effects, already
exists on ModelAgentManager. G-W3 now fires correctly on actual first send.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ProfSynapse pushed a commit that referenced this pull request Apr 7, 2026
Both PRs carry the full PR #97 payload (previously partially rejected)
with workspace optimization commits stacked on top. The new workspace
work (two-tier prompt, cheap restore, dead fetch removal) and 3 bug
fixes are all sound, but neither PR can merge as-is due to the PR #97
baggage (schema migrations v12-v19, action bar, JSONL pruning,
whitespace noise). Recommend extracting the workspace commits into a
clean PR rebased on main.

https://claude.ai/code/session_01XbMN35zn6yxTpYWbNzh57h
Midway65 and others added 24 commits April 7, 2026 10:10
…space, remove redundant DB call"

This reverts commit 25ec9a6.
…pace, remove redundant DB call"

This reverts commit dc94b96.
Explains the rule: upstream migrations ≤ 19 must be renumbered to ≥ 20
on merge to ensure the migrator actually runs them on existing installs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Create docs/fork_divergence.md — authoritative registry of all intentional
  fork divergences from upstream (Tier 1, Tier 2, Tier 3, and special cases)
- Add !docs/fork_divergence.md exception to .gitignore so it is tracked
- Reset connectorContent.ts, StreamingResponseService.ts, StreamingOrchestrator.ts,
  ChatInput.ts, ChatSettingsModal.ts to upstream v5.6.10 (whitespace/timestamp noise)
- Remove extra blank line in VaultIngestionManager.ts (whitespace noise)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…#111-ProfSynapse#115

Documents file-by-file resolution strategy for the next upstream merge,
including the critical MessageBubble.ts refactor (PR ProfSynapse#115), SQLiteCacheManager
split (PR ProfSynapse#113), ProviderHttpClient mobile fix (PR ProfSynapse#103), and tombstone-based
conversation delete (ConversationRepository). Captures upstream's PR audit
findings and their implications for fork strategy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ce.md

- Add next merge target header (upstream/main 35bed84, PRs ProfSynapse#111-ProfSynapse#115)
- Mark ConversationRepository.ts JSONL-delete as DROP (take upstream tombstone)
- Mark ProviderHttpClient.ts as DROP (take upstream desktopRequire version)
- Mark pruneOrphanedConversationFiles as temporary

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…pse#106, ProfSynapse#107, ProfSynapse#112ProfSynapse#115)

Merges upstream/main (35bed84) into my-custom-branch.

Fork additions preserved:
- HybridStorageAdapter: pruneOrphanedConversationFiles() re-added (fork: temporary cleanup)
- SQLiteMaintenanceService: fixVec0TableDimensions() added (fork: vec0 768→384 fix)
- SQLiteCacheManager: calls fixVec0TableDimensions() after migrations
- JSONLWriter: readEventsStreaming() kept; size-check in readEvents() for >50MB files;
  stat() call made optional-chain safe for test environments
- MessageBubble: action bar import, field, appendActionBar/cleanupActionBar methods,
  call sites in createElement/updateWithNewMessage/rebuildElement/cleanup;
  ToolBubbleFactory call uses 3-param signature (action bar owns copy)

Upstream changes taken entirely:
- ProviderHttpClient: dropped our require() fix; took upstream desktopRequire version
- ConversationRepository: dropped JSONL file-delete; took upstream tombstone approach
- ModelAgentManager: 5-service split (PRs ProfSynapse#112)
- SQLiteCacheManager: 6-file split (PR ProfSynapse#113); facade kept; new services accepted
- MessageBubble: 527-line refactor with 4 helper classes (PR ProfSynapse#115)
- PluginScopedStorage: new PluginScopedStorageCoordinator + PluginStoragePathResolver
- 9 new test files accepted from upstream

.gitignore: added !docs/review/ exception (pattern consistent with other doc dirs)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ProviderHttpClient and ConversationRepository divergences resolved (dropped)
- fixVec0TableDimensions relocated to SQLiteMaintenanceService (both files now listed)
- MessageBubble Tier 1 resolution notes updated for new 4-helper upstream structure
- Header updated to current audited state (35bed84)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ProfSynapse#121)

PRs included:
- ProfSynapse#118: esbuild.config.mjs sqlite WASM alias fix
- ProfSynapse#119: ChatView coordinator extraction, Perplexity adapter rewrite, TaskBoard refactor
- ProfSynapse#121: ClaudeCodeAuthService desktop CLI auth fix

Fork conflict resolutions:
- HybridStorageAdapter: took upstream (initialized=true before sync), preserved fork pruneOrphanedConversationFiles block
- MessageBubble: took upstream (ProgressiveToolAccordion, renderSourceFooter), re-applied action bar (import, field, appendActionBar x3, cleanupActionBar, method defs), fixed createTextBubble back to 3-arg
- SQLiteMaintenanceService: preserved fork fixVec0TableDimensions() method
- SQLiteCacheManager: took upstream (with MaintenanceService integration), re-inserted fixVec0TableDimensions() call post-migration
- JSONLWriter: preserved fork streaming readline fallback for >50MB files

Perplexity work stream closed — all 7 bugs/findings fixed by upstream PR ProfSynapse#119.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update header: audited against f4e49fd (PRs ProfSynapse#118, ProfSynapse#119, ProfSynapse#121)
- Promote HybridStorageAdapter.ts to Tier 2 (upstream touched in PR ProfSynapse#119)
- Clarify ToolBubbleFactory.ts Tier 1 note: git auto-keeps 3-param; risk is MessageBubble.ts call site reversion
- Update MessageBubble.ts Tier 1 note to reflect current call site situation
- Retire ChatView.ts and BranchHeader.ts Tier 3 entries (absorbed by upstream coordinator refactor)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants