Sync 2 Inkeep OSS Changes#712
Merged
Merged
Conversation
…733) * refactor(app): extract FileTree pure helpers, icon sprite, and row lookup map Move the pure tree-path helper functions and the Lucide sprite-sheet generation out of FileTree.tsx into sibling modules, merge the three navigate*WithPulse variants into one discriminated-union function, and replace renderRowDecoration's per-row linear scans of the document list with an O(1) Map lookup derived once per document-list change. * test(app): add file-tree-path-helpers unit tests; fix purity JSDoc Address review feedback on the FileTree extraction: - Tighten the module-level purity claim in file-tree-path-helpers.ts to note isEditableKeyboardTarget performs a DOM read (target.closest). - Add co-located file-tree-path-helpers.test.ts covering the two load-bearing invariants the reviewer flagged: buildRowDecorationIndex first-entry-wins on key collision (matching the Array.find scans it replaced) and deleteTargetCoversPendingCreate's file/asset/folder branches, plus the pure string helpers (parse/extension/agent/alternate-sibling) and selectedTreePathsToDeleteTargets dedup/.ok-exclusion/folder-containment. GitOrigin-RevId: 20f65ccbf6006f3a48e0c19ec8b1e009b7f9577f
…nts (#2735) * feat(diagnose): bundle checkpoint refs, agent effects, log drop counts Full-tier bundles now stage the shadow repo's refs/checkpoints listing (state/checkpoint-refs.txt, subjects only) and a state/agent-effects.json snapshot from the new loopback-only GET /api/metrics/agent-effects endpoint, which summarizes the per-doc agent-effects ring buffers as character counts across loaded docs. Doc names in the new artifacts ride the doc.name key so the existing --redact pass anonymizes them. The web client log forwarder counts entries lost to buffer overflow or failed POSTs and carries droppedSinceLastFlush on the next delivered batch; the server persists it as an explicit gap-marker log line. A failed recovery-checkpoint write in the server observers also emits a pino line with doc and branch context alongside the existing warn. * fix(diagnose): register agent-effects handler, redact presence, clamp drop count Address review feedback and the shard2 conflict-gate regression: - Register handleMetricsAgentEffects as exempt in the conflict-gate route registry meta-test (GET, non-mutating; mirrors handleMetricsAgentPresence). This is the integration:shard2 failure. - Hash the agent-presence bundle's currentDoc path in the redactor so a redacted state/agent-presence.json no longer leaks the doc a person edited. - Clamp droppedSinceLastFlush at zero on the success path so concurrent in-flight flushes cannot drive the counter negative and suppress the next gap marker. - Include the failing doc name in the agent-effects handler catch log. - Update the stale "Eight handlers" inventory comment to nine. - Add tests: currentDoc redaction (real presence wire shape + null case) and a sustained-failing-burst drop-count storm case. GitOrigin-RevId: 636f941afb2bfd899d3389963d31e64066247ed3
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.
Copybara-translated 2 Inkeep OSS changes. Rebase-merge this PR so the prepared commits land directly on public main.
Commits: