Skip to content

Dev 2 temp - #56

Open
dix105 wants to merge 636 commits into
mainfrom
dev-2-temp
Open

Dev 2 temp#56
dix105 wants to merge 636 commits into
mainfrom
dev-2-temp

Conversation

@dix105

@dix105 dix105 commented May 22, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

krishmunjapara394 and others added 30 commits May 15, 2026 08:37
Developer and others added 16 commits May 21, 2026 17:20
- Bootstrap topics are now filtered through active-space projects,
  consistent with how chats/projects/sessions are space-scoped.
- Already-imported Telegram group sessions that are missing chat
  entries (pre-fix imports) now get repaired on re-import attempt.
  The repair creates the missing chat with projectId/topicId.
…hats

Fix telegram import: group topics missing from sidebar
* Fix duplicate tool cards: remove completed tools from pendingTools

- store.ts: applyCanonicalToolFromPatch() and applyToolResultById() now
  remove success/error tools from pendingTools once written to message
  history. Tools without a message yet are kept for later attachment.
- ChatView: filteredPending now only includes running/awaitingResult tools
  as a defensive UI-layer guard against stale completed tools.
- chatToolDisplay.ts: mergeToolCallsForDisplay() skips live tools that
  are already completed in the base message history.
- Tests: 6 new tests covering all edge cases, 1 existing test updated
  to verify tool is in message history instead of pendingTools.

* Fix UI filter: keep completed orphan tools visible until attached to message

Review finding: the filteredPending UI filter was hiding completed tools
that hadn't been written to any message yet (orphan tools). Now only
hides completed tools that are already in message history toolCalls.

---------

Co-authored-by: Developer <dev@example.com>
* Improve chat tab switch performance

Fix 1: Pre-warm archived history during telegram import so first chat
open doesn't block on importing 80+ archive files (3s → instant).

Fix 2: Persist patch stream cursor to localStorage so page reloads and
tab switches resume from the last known cursor instead of replaying
all patches from 0.

Fix 3: Cache syncGatewaySessions with 5s TTL so concurrent /api/chats
and /api/bootstrap calls share one Gateway sessions.list response
instead of each making separate 600-2500ms calls.

* Address review: scope cursor key, fix cache races, fire-and-forget prewarm

- Cursor key scoped by middleware URL (prevents stale cursor after
  backend switch/restart). Validates with Number.isSafeInteger.
- Sync cache: skip caching when Gateway disconnected (no-op results
  don't suppress real sync on reconnect). Error cleanup checks cache
  identity to avoid clearing a newer entry.
- Prewarm: fire-and-forget instead of blocking import loop. Timeout
  reduced from 30s to 10s.

* Fix addHook after listen crash in middleware startup

Register onClose hook before app.listen(), then start autoconnect
after listen succeeds. Fixes Fastify FST_ERR_INSTANCE_ALREADY_LISTENING
crash when running the middleware directly.

---------

Co-authored-by: Developer <dev@example.com>
- chat-engine: patch cursor persistence, tool card rendering rules
- middleware: sync cache, telegram import, startup hook ordering
* Fix older messages pagination getting stuck on merged assistant messages

parseChatHistory merges consecutive assistant messages and updates
gatewayIndex to the latest seq. firstLoadedGatewayIndex then returns
a seq that doesn't reflect the actual oldest loaded data, causing
beforeSeq to point to already-loaded ranges → stuck loop.

Fix: track the raw openclawSeq from API responses independently via
oldestLoadedSeqRef. Pagination now uses this raw seq instead of the
parsed/merged gatewayIndex.

* Address review: reset ref on session switch, seed from raw bootstrap

- Reset oldestLoadedSeqRef to null at session init to prevent stale
  cursor from previous chat leaking into new session.
- Seed from raw bootstrapMessages.__openclaw.seq instead of parsed
  displayMessages.gatewayIndex to avoid merge drift.
* Fix duplicate tool cards: remove completed tools from pendingTools

- store.ts: applyCanonicalToolFromPatch() and applyToolResultById() now
  remove success/error tools from pendingTools once written to message
  history. Tools without a message yet are kept for later attachment.
- ChatView: filteredPending now only includes running/awaitingResult tools
  as a defensive UI-layer guard against stale completed tools.
- chatToolDisplay.ts: mergeToolCallsForDisplay() skips live tools that
  are already completed in the base message history.
- Tests: 6 new tests covering all edge cases, 1 existing test updated
  to verify tool is in message history instead of pendingTools.

* Fix UI filter: keep completed orphan tools visible until attached to message

Review finding: the filteredPending UI filter was hiding completed tools
that hadn't been written to any message yet (orphan tools). Now only
hides completed tools that are already in message history toolCalls.

---------

Co-authored-by: Developer <dev@example.com>
@vercel

vercel Bot commented May 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
openclaw-desktop-ui Ignored Ignored Preview May 22, 2026 11:50am

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.

4 participants