提交图

8 提交

作者 SHA1 备注 提交日期
9b2ec64502 fix(pet): read stored preferences and stop the pet from stealing focus
一些检测仍在等待运行
ci / Portable quality checks (push) Waiting to run
ci / Windows Tauri build (push) Waiting to run
An audit of the destroy→hide change across four lenses raised 17
findings; 14 survived adversarial verification. Two of them were
regressions that change introduced, and both had the same shape: code
that only worked because the pet window used to not exist.

  show_pet_context_menu picked the pet window and fell back to main.
  While the pet rendered inside the app its window had been destroyed at
  startup, so the fallback happened to select the visible main window.
  Now that the window merely hides, the menu was being anchored to a
  hidden HWND, which Win32 cannot bring to the foreground. The
  visibility test is explicit now rather than incidental.

  DesktopPetView read the connection state in a mount effect and nothing
  emitted connection events, so destroy-and-rebuild was what re-read it.
  Without a remount the floating pet showed whatever was true at startup
  for the rest of the session. reveal_pet_window now emits
  pet-window-revealed and the view re-reads on it.

The rest were already there. Every pet setting was decorative: the
preferences were applied and then dropped, so reveal_pet_window had to
invent an answer and hard-coded the first monitor, the safe edge and
always-on-top — reverting the user's choices on every show. The pet view
re-sent a fully hard-coded payload whenever game mode toggled, and the
settings page initialised its controls from literals, so returning to
the page and changing one thing pushed three stale defaults back onto
the window. There is a session-scoped store now, a command to read it,
and both frontends read before they write. Persisting it across restarts
is F-75.

Always-on-top is off by default, which is what the Q6 acceptance
criterion asked for (F-35), and the window no longer takes focus when
shown — it was activating on show and swallowing keystrokes meant for
the main window. focusable is left alone on purpose: clearing it adds
WS_EX_NOACTIVATE, which would re-break the context menu now anchored to
that window. That is F-79.

The pet also painted a solid dark rectangle before its assets arrived.
The transparency rule is gated on a class that an effect inside the
5.2 MB lazy chunk added, so until that chunk ran the app's opaque
background won. This is why the earlier hunt for "the rule that beats
!important" found nothing: the class was not applied yet, so specificity
was never the question. The pet now has its own entry document carrying
the class statically. An inline script would not do — tauri-utils only
nonces script[src^='http'], so it would pass in dev and be blocked by
script-src 'self' in a release build.

Rust tests 92 → 97, frontend 30 → 35. All 11 mutations of the new
assertions were confirmed to fail.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 05:25:27 +08:00
3e03a4e8b6 docs: record the pet window fixes and correct the N-11 root cause
一些检测仍在等待运行
ci / Portable quality checks (push) Waiting to run
ci / Windows Tauri build (push) Waiting to run
The queue recorded N-11's cause as "the rebuild path never called
show()". That was a real code defect and it is fixed, but it was not
this symptom — the pet still did not appear after it. The live log
showed the rebuild path failing outright before the reveal step, so the
record now states that and names the fix that actually worked. The two
root causes I proposed and retracted are kept as their own row, since
"tried and disproved" is worth more to the next reader than a clean
record.

Also formats the queue with prettier, which reflows three tables. One
hunk of that reflow was reverted by hand: a continuation line began
with "+" meaning "and", and prettier normalised it into a nested list
item, turning half a sentence into a bullet.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 04:45:09 +08:00
50c75b1105 fix(pet): show the floating pet, and take the card out from behind it
一些检测仍在等待运行
ci / Portable quality checks (push) Waiting to run
ci / Windows Tauri build (push) Waiting to run
Switching the pet to the floating desktop mode made it vanish.
close_pet_window destroys the window rather than hiding it, and the app
closes it on startup whenever the pet renders inside the UI, so opening
the floating pet always went through the rebuild path — which honours
the config's `visible: false` and never showed what it had just built.
Only the already-exists path called show() and placed the window. Both
paths now share one helper.

The in-app pet also sat on an opaque card: .app-pet-overlay
.pet-window-embedded painted a 92% gradient with a border and a drop
shadow over a base class that is transparent. Verified against the real
stylesheet — the backdrop now computes to no image, no colour, no
border and no shadow, with the drag box unchanged at 188x226.

Also record the state of voice chat, window awareness and game
companionship, all three of which are in the declared product scope but
largely unwired: the voice path uses a Web Speech API that WebView2 does
not provide and points away from the architecture's server-side STT
design, the window capture and UI automation modules exist in Rust with
no command registered and no route to the companion, and game mode
toggles a window preference and produces no data at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 04:13:32 +08:00
03b99efda8 feat(astrbot): summarise how stream blocks relate to the final text
一些检测仍在等待运行
ci / Portable quality checks (push) Waiting to run
ci / Windows Tauri build (push) Waiting to run
The first capture identified the real cause of a reply appearing twice,
and it was neither candidate. All 524 frames carried a message_id and
each reply used exactly one, so the event_id fallback is not involved
and neither is the history session fallback.

AstrBot interleaves two kinds of plain frame in one reply. Frames with
streaming true are incremental deltas whose total matches the complete
frame exactly. Frames with streaming false carry whole finished blocks —
one reply had five of them totalling 915 characters against 173
streamed. map_plain appends both, so the blocks show up inline during
generation, and map_complete then replaces the accumulation with the
streamed text alone, discarding them. That is the reply appearing twice
and then collapsing, and the collapse loses content.

One thing lengths cannot settle: whether a block repeats streamed text
or carries its own. One reply had 133 block characters against 142
streamed, which looks like a repeat; another had 915 against 173, which
cannot be. The two need opposite fixes, so this adds a per-stream
summary reporting how many blocks appear in the final text and in the
streamed text, as counts and lengths only.

Also records that plugin images were never sent: no media or attachment
frame appeared in any capture, and no plain frame carried a message
chain array. The attachment path has still never received data.

Refs: N-9 (new), N-4 (root cause found), N-6 (not a client defect).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 02:08:36 +08:00
30d273517a docs(progress): record the R3.5 real-machine feedback batch
一些检测仍在等待运行
ci / Portable quality checks (push) Waiting to run
ci / Windows Tauri build (push) Waiting to run
Three fixes with provable root causes, and two defects left open on
purpose. The double reply bubble and the missing plugin images each have
two plausible causes in our own code, and picking one without evidence
would produce a fix that holds until a different conversation path hits
the other. Record both candidate chains, the frame trace added to settle
them, and the fact that the bubbles collapsing at the end is only the
session filter hiding an orphan that is still in state and in SQLite.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 01:01:22 +08:00
178fba70ea docs(progress): record the R3 batch and its gate results
一些检测仍在等待运行
ci / Portable quality checks (push) Waiting to run
ci / Windows Tauri build (push) Waiting to run
Batch R3 (F-14 through F-19) is implemented and gate-verified. Record
what changed, the measured test counts, and the two things it did not
cover: auto_connect_configured_slots is still serial, and the
operations switch guard still has no production writer.

Also record that the new tests for F-14, F-15 and F-16 were each run
against a mutation restoring the old behaviour and each fails under it,
so they are known not to be tautological.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 00:31:18 +08:00
25f41ff50f docs(reports): assign f-ids to five untracked audit findings
The 2026-07-26 audit records 68 findings, but five of them never
received an F-id and belonged to no batch: P2-6 (download_attachment
buffers the whole body before checking the 16 MiB cap), P2-7 (health()
omits the bearer that SSE sends), P2-8 (the reconnect backoff resets to
100ms on a graceful close, giving a hot loop), P2-29 (JWT exp is
checked with no clock skew margin), and P3-7 (the operations switch
guard has no production writer).

Assign F-70 to F-73 into R5, which already owns gateway_client.rs and
astrbot_client.rs through F-26 and F-30, so the queue's own
same-file-same-batch rule holds and R4 and R5 do not contend for one
file. Assign F-74 into R8 with a note that R3's F-19 extends only the
guard's read side. F-69 stays permanently unassigned because it was
retracted.

Also correct the Rust test count. The queue said 67 to 73 and the
status summary said 67 to 76; a real cargo test --workspace run gives
76 unit tests in astrbot-desktop and 96 passed with 2 ignored across
the workspace, so 73 was stale.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 00:05:00 +08:00
58a98d3c94 docs(reports): record the source audit, fix queue, and R1/R2 results
Adds the 2026-07-26 full-source audit and the execution-ordered fix queue, and
records what actually happened when R1 and R2 were verified:

- R1 had never been compiled. The gate found a type error introduced by its own
  `.nullish()` widening and a lint failure from a non-component export, plus one
  acceptance test that was specified but never written.
- R2 landed F-10 through F-13, and an adversarial review of it surfaced three
  defects the batch had itself introduced, all fixed in the same batch.
- The review subagents ran against the live working tree and left mutations
  behind, including a deliberate duplicate POST inside the stream error path.
  That injected code was briefly mistaken for a real HTTP-stack defect. It has
  been removed and the process note recorded so review runs are isolated next
  time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 23:12:57 +08:00