This commit is contained in:
1 parent
4db3f45164
commit
d25c04cdd2
175 files changed
+56243
-15
No files matched your search
@@ -34,7 +34,13 @@ Keep scope, search query, filters and selected node/revision in the URL. Browser
|
||||
|
||||
Cancel obsolete requests or ignore their results, including obsolete loading and error states. Query polling exists only for a visible need and cannot overlap indefinitely. Avoid a global real-time event system before the product requires it.
|
||||
|
||||
Fetch through the typed API layer. Components receive enough data to render complete states: loading, empty, unavailable, forbidden, stale, index-lagged and successful. A valid empty search is different from a failed request. Profile before adding broad memoization or custom comparison functions. Sanitize Markdown rendering and scope reading typography so source headings cannot restyle navigation.
|
||||
Fetch through the typed API layer. Components receive enough data to render complete states: loading, empty, unavailable, forbidden, stale, index-lagged and successful. A valid empty search is different from a failed request. Apply the shared component and rendering guidance below. Sanitize Markdown rendering and scope reading typography so source headings cannot restyle navigation.
|
||||
|
||||
### Shared UI modules and render performance
|
||||
|
||||
Build repeated administration and reading patterns from application-owned components with small contracts: labels, data props, actions, loading/empty/error states and focus behavior. Keep feature-specific data fetching and mutations in the owning feature module; shared primitives own presentation and interaction mechanics. Use semantic lists for repeated records and a shared dialog primitive for add/edit flows so focus trapping, Escape handling and focus restoration stay consistent. Reuse token-based styles rather than cloning one-off control styles.
|
||||
|
||||
Keep state in the smallest feature that needs it so typing or selection does not rebuild the whole application shell. Give mapped records stable keys. Keep callbacks and derived props stable where a memoized feature boundary depends on them. Use `React.memo` for measured or structurally expensive subtrees with stable props, and `useMemo`/`useCallback` for costly derivation or identity-sensitive boundaries; avoid blanket memoization and custom equality code without a profile. Preserve mounted DOM only when it protects useful form or navigation state, and avoid rendering large hidden collections unnecessarily. Use virtualization only after measurement shows a list exceeds practical DOM cost. Verify actual rerender reduction with React profiling when optimizing a hot path.
|
||||
|
||||
## Verification proportional to the change
|
||||
|
||||
|
||||
@@ -63,4 +63,4 @@ At scaffolding, add import/dependency checks and reusable contract test suites f
|
||||
|
||||
Early acceptance examples: swap an embedding provider and rebuild without changing search consumers; substitute an extraction-stage implementation while preserving old citations; replace a frontend evidence panel without changing the read API; resume an agent run with its original pinned skill version after a newer version is installed. These are required design tests to implement, not existing passes.
|
||||
|
||||
Primary documentation above was checked on 13 October 2026. No module implementation or replacement test exists yet.
|
||||
Primary documentation above was checked on 13 October 2026. The canonical repository port now owns its stable errors, path rules, revision-history semantics and a shared behavioral contract run against both the Git adapter and an independent in-memory implementation. `CanonicalNodeReader` also returns the same accepted node and citations against the substitute without consumer changes. This demonstrates dependency isolation and the checked contract subset; it does not establish durability, locking, crash recovery or production equivalence for another backend. Broader fault, concurrency and filesystem-specific qualification remains required.
|
||||
Reference in new issue
Block a user