Repository navigation
Add shared process reporting with honest phase progress - #141
Open
Myuavbug66 wants to merge 2 commits into
Open
Myuavbug66 wants to merge 2 commits into
Myuavbug66 wants to merge 2 commits into
Conversation
Track honest worker phases, elapsed time and recent outcomes in a compact panel. Keep failures available, support clipboard diagnostics and tab-local interruption recovery, and preserve explicit export failure outcomes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Myuavbug66
marked this pull request as ready for review
November 13, 2026 01:50
Avoid redundant fallback state updates during dense kernel events and return independently transferable empty cut-preview buffers. Add focused regressions without hiding diagnostics or changing geometry validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Add shared process reporting with honest phase progress
Why
The need arose while I was working on a part with 37 million triangles.
During long-running operations, I wanted to see which phase was running and
when it had last reported progress, rather than relying on a busy indicator
alone.
A busy indicator cannot distinguish waiting for a worker from receiving actual
progress. Long, synchronous kernel and simplification calls can stay quiet even
while running. This adds visibility without treating elapsed time as proof of
advancement or inventing an overall percentage, ETA, or stalled-process verdict.
Repeated stops and restarts during large-file testing also exposed a second
gap: once active reporting disappears, there should still be a record of the
last phase and any reported error, without inventing a cause for a browser crash.
What changed
time, latest reported phases, and time since their last received report.
percentage when the next phase cannot quantify progress.
verification directions, with actual verification point/sample counts.
pending requests early.
existing information icon.
reported errors. Failures, timeouts and restored interruptions open details
and stay visible until dismissed.
report closes within two seconds; history remains accessible afterward.
without storing geometry, automatically uploading reports or retrying work.
report to the clipboard for pasting into a support conversation or issue,
even after the active operation has ended.
Implementation
The existing task activity store now retains each request's original label,
start time and latest report time. Worker RPC associates progress and consumed
custom events with request IDs, retaining compatibility with older progress
messages that have no request ID. Replies and worker termination clear their
activities; a timed-out request stays visible until its late reply or worker
termination rather than falsely claiming that the worker stopped.
Terminal replies, worker errors, explicit restarts/shutdowns and export outcomes
are recorded separately. A response timeout records a warning while computation
may continue; a late reply records its eventual outcome.
Export preparation and saving now share one error boundary through
saveBuilt,including synchronous and asynchronous builders. STEP, scan mesh/cloud and
sheet SVG/DXF handlers no longer nest error-owning wrappers: a failed inner
save cannot produce a falsely completed outer export.
The bounded journal uses session storage, isolated by browser tab and site.
Starts/outcomes are saved immediately; progress checkpoints are throttled to
once per second. Pending records restored after reload become interrupted,
with cause unknown and elapsed time limited to the last saved observation.
Storage and clipboard failures are explicit. Diagnostic text redacts paths,
URLs and common credential assignments; users should review it before sharing.
The status strip owns the panel toggle. A single observed application-activity
fallback covers existing busy flags when no tracked requests are present.
The panel refreshes displayed wall-clock durations once a second while active.
Reduction instrumentation reports the same verification work at bounded
intervals. Sorting is explicitly named as a separate phase. The tolerance-first
algorithm, simplification inputs, geometry, verification coverage and output
shape are unchanged. CAD uses existing kernel/helper events.
No new dependencies, version bump, saved-project format changes, speed
optimizations, cancellation implementation or diagnostic Wasm are included.
How to use
Enter or Space, to open the report.
belongs to that phase only, and may restart for the next phase or pass.
requests, it shows Completed and closes within two seconds while the
page is responsive. Failure/timeout/interruption details stay until dismissed.
While work is active, click the panel's Processes heading for history.
Manually reopened history stays open until dismissed.
Clear history to remove them without changing active work or the project.
A 2.5-second popup directly above the clicked button confirms that
diagnostics are on the clipboard, no file
was saved, and the text can be pasted into chat or a text editor. It does
not resize the report box, steal focus or require dismissal.
Existing Cancel/Stop controls remain unchanged. This panel cannot cancel work.
Copy diagnostics after a failure
Why: an operation can fail or stop reporting before someone can record its
last phase and error. The retained history and Copy diagnostics button let
them share the available evidence afterward, rather than trying to reproduce
the failure or describe a vanished message.
opens the recent-operation details, which remain until dismissed. If already
dismissed, reopen them using ERROR - View details or
READY - Recent operations at the bottom left.
active work, click the panel's Processes heading to reach history first.
"Diagnostics copied to clipboard. No file was saved. Paste into chat or
a text editor."
To keep a file, save the pasted text from the editor yourself.
The copied report is formatted JSON containing the app version, capture time,
currently tracked requests and up to 20 recent outcomes. Available details
include operation labels, last reported phases, timestamps, elapsed time,
measured progress and reported error messages. It copies the retained history,
not just the single failure currently being viewed.
No file is created, nothing is uploaded automatically, and no scan geometry
is included. Paths, URLs and common credential assignments are redacted;
review the text before sharing because redaction cannot guarantee removal of
every private detail. If clipboard access fails, the panel shows an explicit
error instead of a success confirmation.
These are observed diagnostics, not a guaranteed crash log or automatic
root-cause analysis. A timeout does not prove that computation stopped, and a
restored interruption does not establish why the browser or operation ended.
Screenshots
Real operation: filling holes
User-supplied capture from the customized local app during a real operation.
The report shows Mesh worker: edit, 7s elapsed, a last update of
0s ago, and Filling holes - 700 of 4,608.... The bottom status strip
repeats the current phase. This is an in-progress example, not evidence of
completion, a performance benchmark or an estimated time remaining.
The desktop and narrow-screen examples below use explicitly synthetic
simultaneous activities to illustrate additional reporting states. They do
not show private project data or represent CAD benchmarks.
Desktop: opening and interpreting the report
Click WORKING at the bottom left to open this panel. The screenshot shows:
with elapsed time and the age of its last update.
than an invented progress value.
panel cannot cancel work.
Narrow screen: the same information in a compact layout
The panel stays within this 390-pixel viewport, keeps both requests readable,
and leaves its WORKING toggle accessible at the bottom. The browser check
also verifies that the panel fits a 280-pixel viewport without horizontal
overflow.
Failure details remain available
An intentionally failing test worker demonstrates retained error details and
the ERROR - View details control. This is not a diagnosis of the earlier
large-scan incident. The Copy diagnostics button at the bottom copies the
retained report for sharing; it does not save a diagnostic file or send it
anywhere automatically.
Interrupted requests after reload
An isolated reload restores the pending request's last checkpoint as interrupted,
not successful or automatically restarted. Details scroll within the small box.
These five images are GitHub attachments, not application-source assets.
Validation
Prepared against upstream v0.11.2 (
89ca713).CI follow-up: dense kernel reports and empty cut previews
The initial GitHub browser job exposed two problems, both reproduced in an
isolated local app:
an already empty application-activity fallback, eventually reaching React's
update-depth limit. Only clear that fallback when it actually exists.
buffer. The worker attempted to transfer that buffer twice and failed.
Retained diagnostics correctly surfaced the previously hidden error, but the
resulting panel covered the mesh-edit test's next control. Return independent
empty buffers; do not hide the failure, dismiss it in the test or change cut
geometry or validation.
Follow-up validation:
planes on both sides of the scan. Both new transfer cases failed before the
fix.
worker sending 1,000 custom kernel-event reports during an active agent
command. This added regression produced React errors before the fix.
Reverse engineer, passed with no console errors in the full local run.
with
Runtime.callFunctionOn: Promise was collected, without app consoleerrors. A repeat also encountered generated-picture overwrite refusals.
Those separate test-environment failures are not suppressed or patched here.
64924d1: all fourunit-test shards, build/browser (including the full browser matrix and
production smoke), CLA and dependency licenses.
Clean CI run.
Pre-follow-up full regression refresh
After the history, clipboard and export-outcome updates:
and 13 skipped. Private-fixture skips remain expected.
checks: passed.
including retained failures, reload recovery, success-close timing and the
button-anchored clipboard confirmation.
89ca713. The native local-save backend and its 512 MBlimit removal are excluded from this reporting-only contribution.
see the subsequent CI follow-up above.
Latest history extension:
Export-outcome follow-up: 21 focused lifecycle/worker tests passed, including
synchronous/asynchronous preparation failures and failed browser download
handoff; build, boundary, units and whitespace passed. The isolated reporting
browser check passed with no console errors, including the latest
button-anchored clipboard notice. Local native-save size-limit changes are
separate customization and are not included in this reporting-only PR.
Four focused lifecycle test files: 23 passed.
Reporting-only build, plugin boundary, units and whitespace checks passed.
Expanded isolated browser check passed with no console errors: actual worker
failure, retained last phase, concurrent success/failure, automatic close
measured against the two-second maximum, unchanged box dimensions, manual
history access, clipboard failure, reload/interruption recovery, no automatic
retries, blocked storage and generated-mesh reduction.
Clipboard-confirmation follow-up: build, boundary, units and whitespace
passed. The isolated browser check verifies clipboard/no-file wording,
measured two-to-three-second visibility, repeated-copy timer reset, continued
visibility after closing the report and no success popup on failed copying.
Customized local integration: 43 focused tests passed, including native
export success/cancellation/write errors; build and the same isolated browser
checks passed. Its isolated candidate passed plugin-boundary and units checks.
Historical reporting baseline validation (before the history extension; the
full suites/build checks are superseded above, while the production-browser
smoke below has not been rerun for the extension):
npm run build: passed.node scripts/check-plugin-boundary.mjs: passed.node scripts/check-units.mjs: passed.git diff --check: passed.npm --prefix mcp test: 149 passed, after restoring this worktree's missingdependencies with its existing lockfile.
node scripts/e2e-process-reporting.mjs: passed with no console errors.Covers pending/independent requests, honest report timestamps, phase changes,
numeric progress, keyboard/click toggling, help text, 280-pixel layout, rapid
event delivery, completion, fallback activity and a generated-mesh reduction.
bundled-worker import, project save/reopen and on-demand STEP/PLY/SVG/DXF
exports.
npm test -- --maxWorkers=2: 3,685 passed, 24 skipped (452 test filespassed, 13 skipped). This is the upstream-only reporting worktree; it does
not include the additional tests in the customized local app.
Limitations and non-goals
Overlapping untracked busy flags are represented by one application-activity
row, not fabricated independent jobs.
Existing feature/build diagnostics remain authoritative. Activity without an
explicit outcome is labelled unknown, not successful.
guaranteed crash log. Closing a tab, clearing storage or a browser crash may
lose records. No assertion of an out-of-memory cause is made without evidence.
geometry progress. Queueing and quiet library calls count toward elapsed time.
Reporting does not prevent unresponsive-page warnings or fix large-mesh
visible-selection performance.
or additional cancellation controls.
scans. Private-fixture skips are reported rather than weakening tolerances.