Skip to content

TT 7656 slow notes - #611

Merged
gtryus merged 3 commits into
developfrom
TT-7656-slow-notes
Sep 15, 2026
Merged

gtryus merged 3 commits into
developfrom
TT-7656-slow-notes

Conversation

@gtryus

@gtryus gtryus commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Cause: Not a leak and not a cold IndexedDB miss. Categories were already in the Orbit memory cache; getArtifactCategorys was awaiting waitForRemoteQueue, which polls every 1s while the remote queue is busy, so the picker stalled mid-session.

Fix: Read from memory.cache.query only; wait for the remote queue only after addNewArtifactCategory; bootstrap special note categories without blocking the read.

Commits:

8872556 — failing Jest + Cypress tests
7d7f80b — production fix + CT selector hardening
Red/green (from src\renderer):

Jest useArtifactCategory: red on baseline, green with fix
Cypress SelectArtifactCategory.cy.tsx: red (empty field under busy queue), green (~400ms)
Regressions: CategoryEdit, ResourceCategory, useCategoryGraphicEdit, CategoryListEdit.cy.tsx all pass

Greg Trihus and others added 3 commits September 14, 2026 15:21
…te queue

Remove waitForRemoteQueue from getArtifactCategorys so the Note Details picker opens immediately mid-session; wait only after creating a category, and bootstrap special note categories without blocking the read.

Co-authored-by: Cursor <cursoragent@cursor.com>
Real issue. The bootstrap marker was set before the fire-and-forget AddOrgNoteCategories write, so a rejected Orbit update left an unhandled rejection and permanently skipped retries for that org on the same hook instance.

Fix: attach .catch that deletes curOrg from specialBootstrapOrgs and reports via logError(Severity.error, errorReporter, err). The read path stays non-blocking.

Test: retries special note-category bootstrap after a failed Orbit write — first memory.update rejects, second read must call update again and log the error.

Red (no catch): unhandled rejection + no retry. Green: 6/6 passing in useArtifactCategory.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused implementation matches the stated objective and includes appropriate regression coverage.

Pull request overview

Improves artifact-category picker responsiveness during Orbit synchronization.

Changes:

  • Reads categories directly from the local Orbit cache.
  • Bootstraps special note categories asynchronously with retry handling.
  • Adds Jest and Cypress regression coverage.
File summaries
File Description
useArtifactCategory.ts Removes queue blocking from reads and moves synchronization waiting to creation.
useArtifactCategory.test.ts Tests cache reads, bootstrap retries, and creation waits.
SelectArtifactCategory.cy.tsx Tests picker responsiveness and preserving user input.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@gtryus
gtryus merged commit 262fd45 into develop Sep 15, 2026
2 checks passed
@gtryus
gtryus deleted the TT-7656-slow-notes branch September 15, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants