mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-11 17:10:38 -10:00
* fix(desktop): stabilize display ownership and recovery Problem: Desktop conversations could flicker, jump, clip content, retain stale workspace data, hide partially indexed sessions, flash background command windows, and fail to recover cleanly from WebView2 renderer failures. Root cause: Scroll position, workspace freshness, catalog completeness, process visibility, DPI synchronization, and WebView2 recovery each had multiple competing owners or treated incomplete refresh state as empty authoritative state. Fix: Centralize transcript scrolling in a deterministic Virtuoso coordinator; add keyed stale-while-revalidate workspace resources, responsive overlay layout, bounded code views, and secure Markdown media resolution; expose partial catalog projections with per-directory completeness and authoritative persist indexing; and add hidden-by-default Windows commands plus a rebased WebView2 integration with single-owner DPI synchronization and tiered crash recovery. Verification: - pnpm test:all - pnpm test:transcript-browser - pnpm build - go test ./... - cd desktop && go test ./... - go test -race ./internal/sessioncatalog ./internal/history ./internal/control ./internal/proc - cd desktop && go test -race . -count=1 - go run ./tools/repolint - Windows amd64 cross-compilation for desktop, proc, update-helper, windows-resource, and WebView2 edge Co-authored-by: ttmouse <[email protected]> * fix(desktop): close display stability review gaps Problem: The initial stability integration still cleared restored workspace selections, replaced working-tree data on refresh failures, allowed background command constructors outside desktop/ to bypass the Windows hidden-window policy, and could serve a media token after its authorized file was replaced. Critical renderer failures could also be dropped behind auxiliary WebView2 diagnostics, while cold Windows CI combined two slow suites under one timeout. Root cause: Workspace refresh and project restoration still had overlapping reset paths; the process gate covered only the desktop directory; media tokens were bound only to a path; the diagnostics queue treated recovery and telemetry equally; and the Windows job shared one aggregate test budget. Fix: Extract a keyed workspace-changes SWR hook and preserve per-project selections, bind media tokens to the authorized file identity with restrictive response headers, extend proc constructors and static enforcement across desktop-used internal packages, preserve hidden flags for batch commands, prioritize renderer recovery, fix upstream formatting/lint findings, and split the Windows vendor test budget without skipping coverage. Verification: - go test ./... - cd desktop && go test ./... - root concurrency-package race suite - cd desktop && go test -race ./... - golangci-lint on native, Linux, and Windows targets - pnpm test:workspace - pnpm test:transcript - pnpm test:all - pnpm build - go run ./tools/repolint - actionlint .github/workflows/ci.yml - Windows cross-compilation for desktop, hook, and WebView2 edge tests * chore(security): document intentional command boundary * chore(deps): update Go toolchain to 1.26.6 --------- Co-authored-by: ttmouse <[email protected]>
37 lines
1.1 KiB
Go
37 lines
1.1 KiB
Go
package proc
|
|
|
|
import (
|
|
"context"
|
|
"os/exec"
|
|
)
|
|
|
|
// Command constructs a desktop background command. On Windows it is hidden by
|
|
// default so new Git/probe/index/update checks cannot accidentally flash a
|
|
// console window.
|
|
func Command(name string, args ...string) *exec.Cmd {
|
|
cmd := exec.Command(name, args...)
|
|
HideWindow(cmd)
|
|
return cmd
|
|
}
|
|
|
|
// CommandContext is Command with cancellation.
|
|
func CommandContext(ctx context.Context, name string, args ...string) *exec.Cmd {
|
|
// Dynamic executables are intentional for approved tools and terminals; name
|
|
// and args remain separate argv values, with any shell explicit at the caller.
|
|
// codeql[go/command-injection]
|
|
cmd := exec.CommandContext(ctx, name, args...)
|
|
HideWindow(cmd)
|
|
return cmd
|
|
}
|
|
|
|
// VisibleCommand is the explicit escape hatch for a user-requested GUI,
|
|
// terminal, installer or application relaunch.
|
|
func VisibleCommand(name string, args ...string) *exec.Cmd {
|
|
return exec.Command(name, args...)
|
|
}
|
|
|
|
// VisibleCommandContext is the context-aware visible escape hatch.
|
|
func VisibleCommandContext(ctx context.Context, name string, args ...string) *exec.Cmd {
|
|
return exec.CommandContext(ctx, name, args...)
|
|
}
|