Repository navigation
feat: add spinner to db query command (closes #63) - #65
Conversation
TrivCodez
left a comment
There was a problem hiding this comment.
Hey @SankeerthNara, nice work on this! Really clean PR overall — appreciate you jumping on this so quickly after being assigned.
What stood out to me:
- You went with the static import for , which is exactly what the issue suggested and keeps things consistent with — solid choice.
- The spinner scoping is spot on. Declaring it outside the
tryso it's accessible in thecatchblock, and usingspinner?.stop()with optional chaining so it doesn't blow up if the error happens before the spinner is even created — those little details show good instincts. - It starts after all the connection setup, so the spinner only covers the actual query execution. That's the right call UX-wise.
- Both output paths (JSON and table) stop the spinner cleanly before printing results.
One tiny thing I noticed:
The file lost its trailing newline at the end (the diff shows \ No newline at end of file). It's a super minor thing — GitHub usually flags it and most editors auto-fix it anyway — but worth keeping an eye on for consistency with the rest of the codebase.
That's really it. The logic is correct, it follows the patterns already established in the project, and it closes out the issue properly. Solid first contribution — hope to see more from you!
Let me know if you have any questions or want me to take another pass after the newline fix.
TrivCodez
left a comment
There was a problem hiding this comment.
Hey @SankeerthNara, nice work on this! Really clean PR overall — appreciate you jumping on this so quickly after being assigned.
What stood out to me:
- You went with the static import for
ora, which is exactly what the issue suggested and keeps things consistent withendpoint.ts— solid choice. - The spinner scoping is spot on. Declaring it outside the
tryso it's accessible in thecatchblock, and usingspinner?.stop()with optional chaining so it doesn't blow up if the error happens before the spinner is even created — those little details show good instincts. - It starts after all the connection setup, so the spinner only covers the actual query execution. That's the right call UX-wise.
- Both output paths (JSON and table) stop the spinner cleanly before printing results.
One tiny thing I noticed:
The file lost its trailing newline at the end (the diff shows \ No newline at end of file). It's a super minor thing — GitHub usually flags it and most editors auto-fix it anyway — but worth keeping an eye on for consistency with the rest of the codebase.
That's really it. The logic is correct, it follows the patterns already established in the project, and it closes out the issue properly. Solid first contribution — hope to see more from you!
Let me know if you have any questions or want me to take another pass after the newline fix.
|
Thanks for pointing out my mistake and rectifying |
|
No worries at all — we all miss those little things from time to time. The spinner implementation itself was solid, just needed that trailing newline polish. Appreciate you being open to feedback and jumping in so quickly. If you're up for it, issues #60, #61, and #62 are similar in scope and also assigned to you — they'd be great next steps if you're looking for more. Happy to review whenever you're ready! 🚀 |
Add spinner/loading indicator to
db queryCloses #63
Summary
db querypreviously gave no visual feedback while the query was executing, which was confusing for long-running queries. This adds anoraspinner that runs while the query executes.Changes
import ora from "ora"(matches the pattern already used inendpoint.ts, sinceorais already a dependency)catchblock, so it doesn't hang on connection or query errorsTesting
npm run buildpasses with no TypeScript errorsorastart/stop pattern used in the real fixDemo
Recording.2026-07-22.144057.mp4
Acceptance criteria
db query <branch> "SELECT 1"shows a spinner while executingnpm run buildpasses with no errors