Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Capacity notice —
useMarkdownDocumentsshows one Sonner notice when a Markdown document listing is refused for capacity, deduped per committed workspace and rearmed only by a successful refresh or adocumentRequestKeychange. - Error classification — new
isMarkdownDocumentCapacityErrorrecognizes the localcodeshape, the Electron IPC wrapper, and the pairedruntime_errorshape;extractIpcErrorMessagenow strips class-name prefixes. - i18n / shared constant —
editor.markdownLinks.capacityadded toenandzh(other locales fall back to thetranslatedefault), andMARKDOWN_DOCUMENT_LISTING_ERROR_MESSAGEis exported. - Tests — unit coverage for the classification shapes plus a hook-level suite for the notice lifecycle (repeat saves, rearm, superseded/unmount/owner-change, Suspense, StrictMode, split panes).
ℹ️ Remote capacity errors classify by message, not the machine code
For paired/remote hosts, mapRuntimeError flattens MarkdownDocumentListingCapacityError to runtime_error because markdown_document_listing_capacity is not in STRUCTURED_RUNTIME_PASSTHROUGH_CODES, so the remote notice is matched by exact equality with MARKDOWN_DOCUMENT_LISTING_ERROR_MESSAGE. The tests pin that shape and it works today, but the remote notice would silently stop firing if that message string is ever edited while the code token is not. No change needed for this PR — noting the coupling for future edits.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
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.

ELI5
When a workspace exceeds the existing Markdown document-listing limit, link completion returns no candidates. The editor now explains why with one notice instead of failing silently. Editing and Save continue to work.
What Changed
Reuse the existing capacity error code, error-message extractor, and Sonner notice. Electron sends a named error as text and drops its custom code, so the extractor also recognizes that exact named-error wrapper. Runtime errors retain their existing checked code path. Other listing failures receive no new capacity notice. The shared extractor also removes named-error prefixes from IPC wrappers for its other callers, so they display the underlying message.
Only the latest request for the committed workspace can show the notice. Repeated failed refreshes do not repeat it; an admitted refresh or committed workspace change permits a later capacity notice. Split panes use the same notice ID. No budget, execution owner, cache, RPC field, or library changes.
Five production paths: 51 additions / 2 deletions, net 49 lines (43 code and 6 locale lines). Two test files add 290 lines. Stacked on #25631 for its existing current-workspace request guards; #25648 is the separate local producer limit tested in the combined app.
Why
Reuse the error emitted by the existing listing budget rather than add another error category or accept a partial index. Exact Electron 43.7.5 dispatch calls
error.toString(), and the renderer creates a new Error. The real app check confirms the class-prefixed text and absent code; synthetic runtime-code tests alone would miss that boundary.The existing committed-request guards also protect stale Save refreshes. Their lifecycle follows React Suspense caveats and the locally checked React 19.2.8 source: hiding layout effects does not make a current request stale. No library internals are overridden.
Linked Issue
Related capacity/freeze investigations: #10990 and #10179. Keep them open: the remote provider's full traversal, native IME, and unrelated freezes are outside this notice change. Credit @nw and @neil for the investigations informing the existing listing limits; no contributor implementation is copied here.
Visual Proof
The before capture uses the bounded producer at
36c267e8e917with its unchanged silent renderer. The after capture uses the combined build at631c10e6a658, whose two notice implementation files are byte-identical to this PR's85b73f872cb0head. Both invoke the real local listing IPC over 20,001 owned Markdown files in a registered non-Git folder project. These are separate hidden Linux apps on Xvfb, not a single-change before/after build pair.Testing
Run
ORCA_BACKGROUND_LAUNCH=1 pnpm test src/renderer/src/components/editor/rich-markdown-ipc-error-message.test.ts src/renderer/src/components/editor/useMarkdownDocuments.capacity-notice.test.tsx src/renderer/src/components/editor/useMarkdownDocuments.navigation.test.ts src/renderer/src/components/editor/useMarkdownDocuments.test.ts src/shared/markdown-document-listing-limits.test.ts.Review
Independent source review found no introduced blocker. Risk is low for the notice scope. Actual product sources, Electron serialization, React request lifetimes, stale-owner controls, save recovery, and existing runtime error handling were checked.
The notice does not make the remote provider's traversal bounded. The existing limit estimates retained objects rather than guarantee an RSS ceiling. Native Windows, physical mobile, live SSH execution UI, and group-backed folder document indexes were not exercised by this notice check; the real non-Git folder-project catalog and local execution owner were asserted.
Agent skill upstream boundary
Notes
Users receive one error notice when the entire index is refused. Link candidates remain unavailable until a successful refresh; this change does not reduce that existing trade-off. Dismissing the notice does not rearm it until an admitted refresh or committed workspace change. Ordinary permission, disconnect, and differently coded errors receive no new capacity notice. English and Chinese translations are included.
Checklist