Skip to content

🐛 Fix: prevent preview refresh during file upload - #3947

Merged
jeffwu-1999 merged 2 commits into
developfrom
cj/fix-preview-refresh
Sep 17, 2026
Merged

jeffwu-1999 merged 2 commits into
developfrom
cj/fix-preview-refresh

Conversation

@cj2026-bit

@cj2026-bit cj2026-bit commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • remove duplicate documentsUpdated dispatch from upload polling
  • keep preview close handling independent from parent callback identity
  • skip redundant document context updates when polling data is unchanged
  • remove noisy knowledge-base filter console logging

Impact review

  • document status, progress, add, delete, reorder, and error changes still update the document list
  • knowledge-base switching and creation flows retain their existing update paths
  • preview access errors still close the drawer through the latest callback
  • no backend, database, ES, AIDP, or Nexent SDK changes

Verification

  • frontend Node tests: 72 passed across 24 files
  • npm run type-check: passed
  • npm run build: passed
  • npm run lint: existing develop baseline has widespread Prettier/unused-variable failures; no new failure from the changed logic
  • manual reproduction logs confirmed the original duplicate event and callback-identity chain before this fix

Test scenario

Upload a processing file, open an existing text preview, and keep it open during polling. Polling may continue, but the preview must not restart from Range 0 or repeatedly run its loading effect.
image

@cj2026-bit cj2026-bit self-assigned this Sep 17, 2026
@cj2026-bit cj2026-bit changed the title fix(frontend): prevent knowledge preview refresh during polling 🐛 Fix: prevent preview refresh during file upload Sep 17, 2026
…resh

# Conflicts:
#	frontend/app/[locale]/knowledges/components/knowledge/KnowledgeBaseList.tsx
@jeffwu-1999
jeffwu-1999 merged commit 06c1cbe into develop Sep 17, 2026
8 checks passed
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