Repository navigation
Added visual loading indicator for vscode extension - #817
Conversation
… loader for extension
There was a problem hiding this comment.
Pull request overview
Adds a lightweight “thinking”/loading indicator to the VS Code extension webview chat UI so users get immediate feedback after submitting a message while waiting for the agent to respond.
Changes:
- Introduces a new
visualLoaderelement that is appended after sending a user message. - Adds
startVisualLoader()to render a 3-dot animated indicator. - Removes the loader when the first agent text chunk is appended.
Suppressed comments (1)
plugins/vscode/media/chat-panel.js:335
- The visual loader is only removed in
appendChunk(). If the backend emits non-text updates first (e.g.tool_call,tool_call_update,plan,agent_thought_chunk) or if the user cancels before the first text chunk arrives, the loader can remain visible indefinitely (and can appear above tool cards / thought UI).
To match the PR/issue description (“removed instantly when the first text token or tool call is received, or on stop/error”), consider extracting a stopVisualLoader() helper and calling it from the non-text update handlers (e.g. handleToolCallUpdate, handlePlanUpdate, agent_thought_chunk) and when processing stops/cancels (e.g. setProcessing(false) / cancellation path).
function appendChunk(textChunk) {
// Remove welcome message and loader if present
const welcome = document.querySelector('.welcome-message');
if (welcome) welcome.remove();
const loader = document.getElementById('session-loader');
if (loader) loader.remove();
if (visualLoader) {
visualLoader.remove();
visualLoader = null;
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| function startVisualLoader() { | ||
| const wrapper = document.createElement('div'); | ||
| wrapper.className = "group flex flex-row gap-1 min-w-0 shrink-0 self-start items-start max-w-full"; | ||
| const delays = [-0.3, -0.15, 0.0]; | ||
| for (let i = 0; i < 3; i++) { | ||
| const dot = document.createElement('div'); | ||
| dot.className = `h-1 w-1 rounded-full bg-white animate-bounce`; | ||
| dot.style.animationTimingFunction = 'ease-in-out'; | ||
| dot.style.animationDelay = `${delays[i]*5}s` | ||
| wrapper.appendChild(dot); | ||
| } | ||
| visualLoader = wrapper; | ||
| messagesContainer.appendChild(wrapper); | ||
| scrollToBottom(); | ||
| } |
|
Hey @Kartik-2239, thanks for the this! It looks good, but we're aiming for something a bit more unique that feels like NanoCoder. As mentioned in the issue, we'd prefer a loading animation built around the NC logo or branding rather than a comman one. That would make the experience feel more recognizable and consistent with NanoCoder's identity. |
|
Oh alright i was actually a little confused by it because i didn't know how exactly to implement a loading animation around the logo, should i use an svg? or something like that? |
|
Hey @akramcodez, nanocoder-loading-spinner.mov |
|
Thanks, @Kartik-2239! Everything looks perfect. Could you just add a changeset? Other than that, everything looks good to me. |
|
Done, thanks |
akramcodez
left a comment
There was a problem hiding this comment.
LGTM again great work @Kartik-2239
|
Hey @Kartik-2239 - thanks for this, the loader is a nice addition and the video looks great. A few things to fix before merge: 1. CSP regression. The new 2. The loader is only removed in 3. Double loaders when queueing. Suggestion: consider inlining the icon into the Smaller notes:
|
… nanocoder and better handling of visual loader
|
Hey @will-lamerton, thanks for going through the changes.
|
|
Hey @Kartik-2239, this PR still has conflicts. Can you fix them? |
|
Hey @akramcodez i fixed the conflicts. It was the css since it was regenerated, i didn't see it before sorry for that |
|
Thanks for the updates @Kartik-2239! Almost everything is looking perfect. There's just one tiny detail left from Will's review: in startVisualLoader(), the loader wrapper is still being appended directly to messagesContainer. This causes tool cards and thought boxes to render below the loader when they arrive before the text, leaving the loader stranded mid-transcript. Could you update it so it gets appended to the active turn element instead (or similar) so it stays at the bottom? Let me know if you need any help with that! |
|
Hey @akramcodez, I did this by appending the same loader (saved as Screen.Recording.2026-08-11.at.11.08.10.PM.mov |
|
Hey @Kartik-2239 - love this. I think the only thing I don't like is that the NC logo stays showing as text and tools stream. I think as you said, once the first token streams, the loading indicator should disappear. What do you think? |
- Implemented a new method to rename sessions in the ACP client and updated the corresponding webview provider to handle rename requests. - Enhanced session data structure to include an `updatedAt` timestamp for better session management. - Modified the chat panel to display relative time for the last session update. - Updated session management logic to prevent auto-derived titles from overwriting user-defined titles. - Added UI elements for editing session titles in the chat panel, including input handling for renaming sessions.
… dependency in this repo, already the established pattern in 5+ other spec files (streaming-reasoning.spec.tsx etc.). Verified it passes both with and without FORCE_COLOR set.
- styled-select-input.spec.tsx: strip ANSI codes before matching output. CI sets FORCE_COLOR=1, so Ink renders real color codes and the "> " indicator regex no longer matches the start of the line - user-input.spec.tsx: add missing unmount() to 18 tests that rendered and never tore down. AVA runs a file's tests concurrently, so these piled up and starved later tests under CI's more limited CPU
|
Looking great. Thanks for this work @Kartik-2239 - feel free to add yourself as a contributor to our website via a PR which I will approve :) https://nanocollective.org/contributors |
) * added a variable for visual loader and a function to start the visual loader for extension * nancoder svg pulse effect as a visual loading indicator in vscode extension * nancoder svg pulse effect as a visual loading indicator in vscode extension * added a changeset for visual loading indicator * regenerated css, removed connect-src and duplicate img-src and inline nanocoder and better handling of visual loader * feat: add session renaming functionality and update session metadata - Implemented a new method to rename sessions in the ACP client and updated the corresponding webview provider to handle rename requests. - Enhanced session data structure to include an `updatedAt` timestamp for better session management. - Modified the chat panel to display relative time for the last session update. - Updated session management logic to prevent auto-derived titles from overwriting user-defined titles. - Added UI elements for editing session titles in the chat panel, including input handling for renaming sessions. * docs: added the changgset for vs code session renaming * - Fix: strip ANSI codes before matching, using strip-ansi — already a dependency in this repo, already the established pattern in 5+ other spec files (streaming-reasoning.spec.tsx etc.). Verified it passes both with and without FORCE_COLOR set. * fix: unrelated test flakiness in CI (color codes + unmounted renders) - styled-select-input.spec.tsx: strip ANSI codes before matching output. CI sets FORCE_COLOR=1, so Ink renders real color codes and the "> " indicator regex no longer matches the start of the line - user-input.spec.tsx: add missing unmount() to 18 tests that rendered and never tore down. AVA runs a file's tests concurrently, so these piled up and starved later tests under CI's more limited CPU * Update status badges [skip ci] * fix: summarize oversized git diffs * fix: refine oversized git diffs * chore: trigger CI re-run * Update status badges [skip ci] * visual loader stays at bottom and disappear on first text chunk * rebuilt css * syntax error fix * had messed up conflicts in last merge * add baack openPath and showError --------- Co-authored-by: arpan <[email protected]> Co-authored-by: GitHub Action <[email protected]> Co-authored-by: RealBhupesh <[email protected]> Co-authored-by: addyCooks <[email protected]>
… loader for extension
Description
This PR adds a small visual loading indicator for the chat ui in vscode extension in the ui (#804 ), it adds a wrapper div and uses css animation. It appears on sending a message and disappears right before the first chunk of response or stopping or error.
Screen.Recording.2026-08-07.at.5.10.27.PM.mov
Type of Change
Changeset
pnpm changeset) describing this change for the changelogDocs-only or internal chores need no changeset (or run
pnpm changeset --emptyto note that intentionally).Testing
Automated Tests
.spec.ts/tsxfilespnpm test:allcompletes successfully)It only uses the DOM so no tests added.
Manual Testing
Checklist