Skip to content

fix(client-web): prevent Plus One sidebar flicker during chat completion refresh#44

Merged
DJJones66 merged 1 commit intomainfrom
fix/plus-one-sidebar-flicker
Apr 9, 2026
Merged

fix(client-web): prevent Plus One sidebar flicker during chat completion refresh#44
DJJones66 merged 1 commit intomainfrom
fix/plus-one-sidebar-flicker

Conversation

@DJJones66
Copy link
Copy Markdown
Collaborator

Summary

This PR fixes sidebar flicker in Plus One where each AI response completion caused a visible sidebar refresh/reload.

What changed

  • Updated useProjects.refreshProjects() to keep existing project list visible during background refreshes (only show loading on initial empty load).
  • Added a guard in selectProject() to no-op when re-selecting the currently active project.
  • Added hook regression tests for:
    • no project-list loading flip during background refresh
    • no duplicate file fetch when selecting the active project

Files changed

  • builds/typescript/client_web/src/hooks/useProjects.ts
  • builds/typescript/client_web/src/hooks/useProjects.test.ts

Why this fixes it

Plus One calls refreshProjects() after conversation completion. Previously that toggled isLoadingProjects and swapped sidebar content to a loading state, causing visual flicker. Now refreshes are non-disruptive once data exists, and redundant project reselection no longer triggers file reload churn.

Validation

  • npm test -- src/hooks/useProjects.test.ts
  • npm test -- src/components/layout/Sidebar.test.tsx

@DJJones66 DJJones66 merged commit 6f66a3e into main Apr 9, 2026
@davewaring davewaring deleted the fix/plus-one-sidebar-flicker branch April 13, 2026 23:38
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.

1 participant