Skip to content

fix(desktop): remove first-send empty hero flash - #4246

Merged
liugddx merged 1 commit into
apache:mainfrom
Sun-GLiang:fix/first-send-hero-flash
Aug 30, 2026
Merged

fix(desktop): remove first-send empty hero flash#4246
liugddx merged 1 commit into
apache:mainfrom
Sun-GLiang:fix/first-send-hero-flash

Conversation

@Sun-GLiang

Copy link
Copy Markdown
Contributor

Summary

The first submitted prompt could share a render with the empty-chat Maka hero while its new Session was activating. This projects the optimistic row before activation, cleans it up if activation loses ownership, and stops ChatView from prepending empty content when a transient user row is already visible.

Fixes#4245

Before / after

Both images capture the first real Electron renderer mutation batch containing the submitted transient message. The input was the same image/png attachment plus 请分析这张图片中的内容 at 1280 × 800.

BeforeAfter
Before: the empty-chat Maka hero and submitted prompt are visible togetherAfter: only the submitted prompt is visible

Verification

  • Isolated Electron E2E before/after capture: 1/1 passed on each version
  • Focused first-send and streaming-handoff suites: 32/32 passed
  • npm run build
  • npm run lint
  • npm run format:check
  • npm run typecheck
  • npx knip --workspace apps/desktop
  • npx knip --workspace packages/ui
  • git diff --check

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Maka diagnosed the render-order gap, implemented the optimistic projection and empty-state guard, added regression tests, and produced the isolated Electron E2E evidence. The material commit includes a Generated-by: Maka trailer.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

Project the first optimistic message before activating its new Session and suppress empty-chat content whenever a transient row is visible.
Generated-by: Maka
@github-actionsgithub-actionsBot added the effort/S Under 100 readable lines label Aug 30, 2026

@jackwenerjackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head a2126aa46eae3e35084f6cc90e9c5dff3b6925af.

I found no blocking issues. The first user row is now projected under the newly created Session before activation waits for observation, closing the render interval in which the empty-chat hero could appear beside the submitted prompt. The same optimistic identity is removed if activation loses ownership, the send is refused, or the operation throws. ChatView also treats any visible transient row as conversation content, so it no longer prepends the empty state while that row waits for durable or live-turn identity.

The exact-head full build and the focused first-send/streaming suites passed (32/32). A clean synthetic merge onto current main (8c491e64b35cd7af66437efc8020a88b171e2bb6) preserved the PR patch, passed the full build, and passed the same 32 tests. Biome, git diff --check, the ASF header audit, and the exact-head hosted test check also passed.

Not independently repeated: the packaged Electron screenshot capture described in the PR.


Automated review notice: This comment was posted by an automated review agent operated by WAWQAQ. It is not an independent human review and does not replace one.

@liugddx
liugddx merged commit bdb103d into apache:mainAug 30, 2026
2 checks passed
liuxiaocs7 added a commit to liuxiaocs7/maka that referenced this pull request Aug 30, 2026
Three renderer files tracked by the architecture ledger drifted after
the ledger was last regenerated in apache#4249, each landing without a paired
ledger update:
- app-shell-chat-actions.ts nonTriviaTokens 4363 -> 4376 (apache#4246)
- app-shell-session-events.ts nonTriviaTokens 2931 -> 3042 (apache#4232)
- import-tasks-settings-page.tsx hookCalls useEffect 4->5, useRef 3->5 (apache#3905)
CI first went red on apache#4246 and accumulated the other two, wedging the
'Check renderer architecture' job on main and every branch cut from it.
Regenerate the snapshot (--write) to match the current source; no
runtime code changes.
Generated-by: Claude Code
saltand pushed a commit to saltand/maka-agent that referenced this pull request Aug 31, 2026
Project the first optimistic message before activating its new Session and suppress empty-chat content whenever a transient row is visible.
Generated-by: Maka
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/SUnder 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop first attachment send briefly flashes the empty-chat hero

3 participants

@Sun-GLiang@jackwener@liugddx