Skip to content

Note Widget Fixes - #36

Open
prestoncraw wants to merge 3 commits into
mainfrom
NoteWindow_ExcessiveCalls
Open

Note Widget Fixes#36
prestoncraw wants to merge 3 commits into
mainfrom
NoteWindow_ExcessiveCalls

Conversation

@prestoncraw

@prestoncraw prestoncraw commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Paginate NoteWindow results with the Gemstone SearchPage and GetPageInfo queries instead of loading every note with GetAll.
  • Apply selected note-tag filters on the server and reset paging when the active record or selected types change.
  • Track page-info loading and error states alongside note loading.
  • Add permission-aware note deletion with a confirmation prompt and refresh the current results after deletion.

Depends On

@prestoncraw
prestoncraw marked this pull request as draft August 6, 2026 20:16
@prestoncraw
prestoncraw marked this pull request as ready for review August 6, 2026 20:52
@prestoncraw
prestoncraw force-pushed the NoteWindow_ExcessiveCalls branch from ce0e518 to 4415d6a Compare August 6, 2026 20:52
@prestoncraw
prestoncraw requested a review from elwills August 6, 2026 20:52
@elwills
elwills requested a lite review from Copilot August 7, 2026 13:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Notes widget to use server-side pagination and filtering for note results, and adds permission-aware note deletion with confirmation, improving scalability and UX for large note sets.

Changes:

  • Switched note loading from GetAll to paged queries (SearchPage) and added page-count retrieval (GetPageInfo).
  • Moved selected note-tag filtering to the server and reset paging when key context changes (record/reference/tags).
  • Added delete capability gated by authorization, with a confirmation prompt and refresh after deletion.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
TSX/Widget/NoteWindow/NoteWindow.tsx Implements server-side paging/filtering, page-info tracking, and deletion workflow wiring.
TSX/Widget/NoteWindow/NoteTable.tsx Adds delete UI (trash button + confirmation modal) and passes deletion callbacks/state.
Suppressed comments (1)

TSX/Widget/NoteWindow/NoteWindow.tsx:230

  • When metadata is loading/errored, notes are cleared but noteStatus is not reset. If noteStatus is currently 'loading' or 'error' from a prior request, the UI can keep showing a spinner or the "fetching note data" error while metadata is (re)loading for a different record/event.
            if (metadataLoading || metadataError) {
                setNotes([]);
                return;
            }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread TSX/Widget/NoteWindow/NoteWindow.tsx
@prestoncraw
prestoncraw requested review from elwills and removed request for elwills August 7, 2026 15:25
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.

3 participants