Repository navigation
Desktop iteration: container row actions/memory/logs + docker plan batch 1 + ssh reliability (in progress) - #2
Open
SongRenShuo wants to merge 498 commits into
Open
SongRenShuo wants to merge 498 commits into
SongRenShuo wants to merge 498 commits into
Conversation
… tabs, and the window clips its own scrollbar The quick-action row wraps instead of squeezing: the new-session button never truncates again, the six controls fold to their own line when the panel is narrow, and the search field keeps a width its placeholder can be read in. The session hover card hangs from the row's top edge now, so it grows downward into the list's own space and can never climb over the workspace's tab toolbar. The workbench window clips its content on a plain overflow-hidden shell under the blurred pane, so a scrollbar corner cannot bleed past the rounded border as a white block. The editor dialog's helper lines get the same breathing room under every field.
…ecklist ticks, entries
…top content plan land
…memory share, and its logs
…ead of drawing a blank frame
… the changelog takes the empty-state note
… and refusals pause their callers
… the fix that answers it
…y "the reference" The five dedicated benchmark research/plan files are gone. The memory index and the changelog follow the removal, the remaining plans and research reports speak of the reference product instead, and the desktop comments and two test names drop the benchmark's name. The iteration branch name and the public mirror fixtures stay, as decided.
…orgives a race The engine gains three things the desktop's docker window needs to follow its engine by itself: - A read-only events stream. `container_events_start` follows the engine's own `events` on the stream channel the logs already ride, each raw line reduced to a wire-shaped `ContainerEvent` where the dialects live; a line that names no id reaches nobody. The capability bit (`eventsAvailable`) is probed once at desktop-engine open, network-free, and rides `ContainerRuntimeInfo`. - The health verdict. `ps` gains a `.Health` column (docker), the JSON dialects are read for theirs, and `ContainerSummary.health` arrives empty — off the wire — when a container has no healthcheck at all. - An action that arrives late is a success with a name. A remove or stop whose container the engine already settled, a pause that raced its own pause, answer `ContainerActionOutcome::AlreadySatisfied` instead of an error; a start of a container that is gone stays an error, because the state it asks for cannot be reached.
…wn streams The desktop's docker window stops waiting for a hand it can follow by itself: - The container list subscribes to the engine's event stream once the engine answers its capability bit, reads itself after a 300ms settle so a restart burst is one read, and realigns with a forced full read the moment the stream comes back. An engine without the bit is followed exactly as before — no subscription, no poll, no error. An ended stream reconnects on a geometric backoff (1s doubling to a 30s ceiling), and a hidden window neither reads nor queues: one read on return covers what it missed. - A log stream the container's own restart broke watches the list for the container running again and reopens by itself, saying so while it waits; three reopens that ended without a single line hand the view back to the person, with the restart button that was always there. - A second ask for the same write while the first is still on its way meets the first call — a double click is one stop, not two. - A container row draws the engine's healthcheck verdict beside its state, in the same tag language, in both locales, and the overview counts a failing healthcheck inside a running container as an unhealthy engine.
…, sampling and reconnect gates, CHANNEL-REFUSED
…reconnects, idempotent actions, healthcheck badges
…, not just the tests
…nswers on updates Ticked container rows are a batch: start runs at once, stop and remove are asked about once with the consequence said for the lot, each row carries its own loading word while it waits, and the engine's answers come back sorted — done, already-satisfied, refused — into one summary the toast says out loud, the first ten refusals named. The batch is the view's own orchestration over the same one-container action the rows use; the engine gains no batch verb and every destructive answer still travels with its acknowledged flag. The store's action now answers what the engine said it came back as, and a shared runLimited keeps both this sweep and the image sweep a few at a time. The image list's update column now speaks one of three states — not checked, up to date, new version — where it used to stay silent until a row menu check asked. The page's own check-for-updates sweep asks every image the engine can question, a few at a time, the count read on the button while it runs and the list free the whole way; an answer that turns an image from unknown to newer is told to the notification centre, which gains the images group for it.
…update column, the sweep notices
…update column, full recheck, notice-center updates
…charts re-formed The desktop's charts stop being three private shapes and become one vocabulary layer - components/charts - that every page's charts are drawn from: - Six primitives: SparkBars (the monitor's bar row, one shared scale, bars not lines), SparkArea (the container windows' trends, an area where a bare line used to claim the space between samples was measured), RingGauge, MiniBar, StatTile and SparklineStrip. No library, no animation, and every colour a var() reference - the directory's own spec reads its sources and fails on a literal, the closeout grep made permanent. - The threshold is one entry. The tiers resolve through usageTone (90 amber, 95 red); tone.ts maps the tier to the theme's tokens, and no chart keeps a threshold of its own. The monitor panel's usage bars wear the tiers for the first time; the system panel's disk rings gain the amber step they used to skip straight past; the Docker windows' memory line wears the tier its reading earns, while a rate keeps its series colour, because a threshold that is not a usage is decoration. - The three old shapes are replaced, not left behind: MonitorSpark and StatSparkline are deleted, the system panel's inline ring is the gauge now, and the Docker windows' six charts are SparkArea. - globals.css gains the token layer the next batches consume: .nums (the numeric track, apart from the monospace one), .skeleton (a grey block that breathes where the structure is known) and .state-empty (one sentence and the action that leaves it), all in the utilities layer.
…-merged The proof is in the live readings: 120 bytes intact, paired slots held and released, hard-kill orphan delta zero against the real sshd. The lane kept it on its own branch as instructed; the ledger records what it proved and the one narrow residual window it chose to document rather than paper over.
The dual-channel sentinel closed every death shape except one: a client dying between A's child starting and the PID being written to B left B with no number to kill and the child as a PPID-1 orphan. A's template now holds the child at a gate: it prints the marker, then blocks on `read -r gate` on A's own stdin (the exec channel's write side, which this client never uses for stream data). The client writes the PID to B, then releases the gate with one newline byte on A. If the client dies first, the gate read hits EOF and A kills its own child before it can outlive the client; after the PID write, B's PID kill and A's gate EOF both cover it. Data flow is unchanged: the gate is on stdin, not on the inner command's stdout, so a log line that looks like a gate byte cannot be consumed and the gate byte cannot eat stream output. - watchdog.rs: gated STREAM_A_TEMPLATE, GATE_BYTE, updated pure tests and a decoy test proving gate-like stream bytes are forwarded intact. - session.rs: write GATE_BYTE after the PID handoff; both writes have an idempotent close path. Feature-gated test seam at each write. - test_hooks.rs: thread-local test-only delays behind the `test-window-hook` feature, enabled only by the process lab's dev-dependency, never in a shipped build. - stream_watchdog_process.rs: two window labs that kill the client before the PID write and after the PID write before the gate, asserting no orphan and both slots released. - security-model.md / architecture.md: contract updated for the gate. WIP: red-then-green probe and full gates still to run.
…stically The first draft of the window tests judged the A wrapper process and used `session.close()` as the client death. Two problems: the wrapper could be reaped while its `sleep` grandchild survived as a PPID-1 orphan (a false green), and the SSH disconnect killed the child through a channel unrelated to the gate (a false green on the red probe). Now the stub `exec sleep`s so the PID A prints and B kills is the long-lived process itself, and each window test uses a distinct sleep duration (31/32) so it can count its own orphans in the shared process table. Client death is modelled faithfully: abort the opener (so it cannot write the gate byte) and drop only the channels' stdin pipes (the one signal the far-side shells read) with a `client_gone` flag so an in-flight write cannot re-open the pipe. Red probe (gate removed): the pre-PID-write test fails with "the child outlived the client in the pre-PID-write window — a PPID-1 orphan". Green (gate restored): all five process-lab tests pass in under a second.
The gate protocol, the two window labs, and the red-then-green probe in the [Unreleased] Fixed section, English and Chinese, with the two commit hashes.
The probe's red message - 'the child outlived the client in the pre-PID-write window' - is the defect the gate was built for, and the live window kill now measures zero orphans. The ledger keeps both.
…was doing the killing The ledger claimed the only thing left was an honest note about the test fixture: "MSYS does not reap grandchildren, so `exec sleep` stands in for a real binary". Re-measured, that sentence does not hold, and the thing it hid matters more than the sentence did. With the stub's `sleep 30` swapped for `exec sleep 300` - the shape of a real log follow - and the suite run serially, 2 of 3 runs took 302 seconds each. The two "leaves no process behind" tests were passing on the stub's own expiry roughly two runs in three, not on the sentinel's kill. The product invariant itself was never violated: ten serial rounds counted `orphans_before=0 after=0`, and the parallel suite leaves nothing behind either. What was overstated was the coverage of those two negative tests. A red probe proves the tests can see the difference they are supposed to see: with B's `kill` removed, exactly those two go red and the other three stay green (`PROBE-REVERT-KILL`, zero leftovers). The mechanism is in the lab, not the product: `drop(session)` tears the SSH connection down and the server handler is dropped, which is what closes B's stdin; between `close_pipe` and the `data` write's take/put-back of that stdin there is a window, and a close that lands inside it gets undone by the write. Care is needed before changing that, and this session's other "failures" turned out to be an external `cargo build` holding the package-cache lock - hence the isolated target dir in the note, and hence no test change shipped here: an unverified edit would have been worse than the accurate note. Left for the next session: make those two tests not depend on the far-side process expiring on its own, or assert in the lab that a write after close must fail. Until then their reading holds only under `cargo test`'s default parallelism with the 30-second stub.
The spike's four gates ran on the real host before any implementation lane was opened: client SIGKILL 3/3, TCP RST 3/3, deliberate close 1/1, and a control child without a sentinel surviving every run - which is what isolates the cause to channel B rather than to the act of killing anything. Session budget measured at maxsessions 10 with the honest caveat that a follow costs two slots and four simultaneous follows starve. Kept verbatim, probe scripts included: the numbers in the plan's D-4 section are these numbers, and a reader should be able to re-run them. The report's own 'residual race' paragraph is the window the gated start later closed on the implementation branch.
…eader can re-run it The merge brought SPIKE-REPORT.md and its two probes to the repository root, which is nobody's convention. They now sit beside the other evidence under docs/开发计划/assets/watchdog-spike/, unchanged, and the D-4 section points there. The plan's own numbers for the four gates are these files' numbers.
The two process labs could pass when the stub's own sleep expired rather than when B killed it. Two things made them racy: the lab's `data` handler could re-insert a stdin that a concurrent close had just dropped, and the base stub printed its readiness lines and immediately exec'd a native sleep, so B's kill landed inside MSYS's lost-signal window. Wire the `client_gone` flag that was already on `LabProcess` but never read: a close sets it and a completed write drops its loaned stdin instead of re-inserting it. Let the stub settle before its exec so the printed PID is signal-receptive when B kills it. Both changes are in the test lab; the product template is untouched.
…chdog branch The lane measured a different cause than the one the brief guessed: in the failing runs B's stdin WAS dropped and B DID report kill rc=0, but the freshly exec'd native image silently discarded the signal. On this MSYS host a signal inside ~20ms of exec is lost 20/20 times; after ~50ms it lands 15/15. Both the wired client_gone guard and a short settle in the fixture were needed - the guard alone still took 300s. Green is 8 consecutive serial runs at 2.18-3.00s with the 300s stub, which is the number that matters: a clock-driven pass would have taken 300 seconds. Red probe bd2195cf turns exactly the two target tests red at 602.86s. Main controller reproduced 5/5 at 2.42-2.75s. The fix sits on feat/dual-channel-watchdog at 43a5505; nothing merged or pushed.
PIP-0002 captures the accepted design that was approved and merged at fd1ec1a0. Written on the main line after the fact so the security-model decision and its feasibility evidence survive with the code; status Accepted because it is settled.
Every death shape now ends the far-side process of a follow stream: a polite close, a client SIGKILL, a TCP RST, and sshd's own death. The single-channel wrapper this replaces was falsified on the real host - this client's exec channels have stdin at EOF the moment they open - so the sentinel rides a second channel whose stdin is kept open on purpose. The starting-line gate closes the window before the PID reaches the sentinel. Evidence: feasibility spike (SIGKILL 3/3, RST 3/3, graceful 1/1, controls survived), live hard-kill orphan delta zero, window red probe naming the PPID-1 orphan, and two negative tests that now prove the kill rather than the clock (300s stub, 8 consecutive green runs at 2-3s). Full gates on the merged tree: workspace 1942/1942, clippy/fmt/build/release green, advisories ok (offline). PIP-0002 records the decision.
…nding The merge is on the main line at 3d9a2e3 with PIP-0002 Accepted. Both stale sentences ('branch not merged, needs redesign' and 'watchdog redesign left for the next session') would now be false. Replace them with the final readings: 1942/1942 on the merged tree, clippy/fmt/build/release, offline advisories ok, and the frontend gate honestly marked not run because node_modules is absent and the merge touched no frontend files.
…and the 28-conflict map Upstream main stopped at 0.6.1 while v0.7.0 and v0.7.1 were already released ahead of it, so the sync targets the v0.7.1 tag. main is reset to that tag; desktop-iteration merges it and keeps its 482 commits. The plan records the 28 conflicted files, the per-file strategy, the gates, the push lease, and the rollback refs.
Upstream main had stopped at 0.6.1 while v0.7.0 and v0.7.1 were released ahead of it. This merge brings terminal splits and input broadcasting, the CodeMirror editor rewrite and its preferences, the file-tree and whole-folder upload changes, the colour-scheme import, and the 0.7.1 version bump. The resolution keeps the desktop workbench, the file browser features (search, recent, kind filter, trash mode), the CodeEditor stack and the sevenshell-web lib/bin split. The upstream TextEditor serves the Kubernetes dialogs only.
…e to RUSTSEC-2026-0620 affects curve25519-dalek 5.0.0, which is the newest release and what ed25519-dalek 3.0.0 requires. The affected backend is only compiled when a build asks for AVX-512, which this workspace never does, and the advisory's workaround is exactly that. The ignore carries its reason, like the zip entries above it.
The settings page has stored the indent width, the space-or-tab choice and the auto-indent switch since the upstream sync, but CodeEditor still hard-coded two spaces. The three now live in their own compartment, so a change reconfigures the open document instead of rebuilding it, and both hosts pass the stored values.
The sync entry names the merge and the indent follow-up; the two 0.6.0 sections now say which line each came from. Four active lessons cover the upstream-main-vs-tag trap, pipeline exit codes, duplicate dependency types, and API seams outside the conflict list.
…he site VitePress builds from docs/ and cannot resolve a path above it; the dead-link check failed the docs build. The file is named in a code span, which is what the rest of the paragraph does for source paths.
The deep comparison found the upstream TextEditor is a form control for K8s YAML while CodeEditor is the document editor; replacing one with the other would drop highlighting, find, folding and line numbers. The plan keeps both shells, fixes the drift first (P0-P2), and extracts a shared headless core later (P3).
The lab prepended the stub to PATH with a semicolon, which only splits on Windows; on the Linux and macOS runners the stub was never found and every follow failed before its first line. The stub was also written without the execute bit, which MSYS ignores and unix refuses. Both are platform details the lab carried from the machine it was written on.
CodeEditor grows an optional busy prop, so a write in progress locks the document exactly as a read-only file does. The dialog and the window both pass saving as busy instead of spelling readonly || saving at the call site. The e2e file dialog case now selects [data-code-editor], which is the surface it actually draws; the old [data-text-editor] anchor only exists on TextEditor.
editorFile now owns the LF buffer against the file's own separator (separator plus editorText), refuses a second save while one is in flight, and captures the handle and path so a write that lands after the surface moved on cannot mark another file clean. Reads carry a generation, so an older answer is dropped instead of replacing the newer document. FileEditor drops its local editorText, its private read guard and saveCurrent; WorkbenchEditorPane binds editorText and uses the shared save. The dialog and the window now agree on CRLF and on one save at a time, pinned by editorFile and Workbench specs.
Workbench panes now answer Mod+Enter by saving, without closing the tab or the window: a window has nowhere to leave, so the dialog's submit-and-close is a plain save here. Both surfaces read the binding through a new useEditorShortcuts composable, which resolves the settings overrides and the platform modifier once. CodeEditor grows a tabFocusBinding prop (default Mod-Shift-M) that toggles EditorView.setTabFocusMode, and callers pass the resolved editor.toggleTabFocus binding, so the surface keeps its zero-store boundary. An external replace is kept out of the undo history, composition keys are stopped before CodeMirror sees them, and the document carries aria-label, aria-readonly, aria-busy and spellcheck=false. Specs pin Tab no longer indenting after the toggle (including a caller-supplied binding) and Mod+Enter saving without inserting a blank line or closing anything.
Move the assembly both shells had written twice into lib/editor/surface.ts: the compartment set, the read-only pair, the indentation unit and its Enter override, the accessible attributes, the keymap order and the CRLF bridge. CodeEditor keeps its document features and TextEditor keeps its form semantics; neither prop, emit nor exposed method changes.
The codemirror meta package had no import anywhere; the editor imports the scoped packages it uses. The file-dialog e2e still asserted TextEditor's bottom-bar Tab button, which CodeEditor does not draw; it now asserts the document anchor, the tools row and the save button, and that Tab-focus mode hands Tab to the dialog. The e2e needs the SSH lab and is recorded as not run.
The two surfaces share a headless core, saves lock the buffer, both keep CRLF, and the window gained submit and Tab focus. The plan's checklist is closed with the five commits and the e2e not-run note.
A `git ls-remote | head && gh workflow run` check dispatched a duplicate run when the network failed, because the pipeline's exit status came from head. The editor plan records the macOS job that never got a runner as a not-run, not a red.
This is a Cargo workspace, so the bundler writes under the repository's root target directory; the workflow's src-tauri path found nothing.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Iteration branch for the desktop lane. CI runs here so local compute stays free.
Re-opened after the branch's history was rewritten and the branch renamed.