Fix question prompt not rendering for active session - #325
Merged
chriswritescode-dev merged 2 commits intoJul 28, 2026
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughChangesQuestion lookup flow
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/src/pages/SessionDetail.tsx`:
- Around line 176-177: Guard the sessionId argument in the currentQuestion
initialization within SessionDetail so getQuestionForSession is called only when
sessionId is defined, returning null otherwise. Keep the existing
getQuestionForSession behavior unchanged for valid string session IDs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3ef53df2-9fce-437f-aec4-687f9d06a220
📒 Files selected for processing (2)
frontend/src/contexts/EventContext.tsxfrontend/src/pages/SessionDetail.tsx
currentQuestion was the first pending question globally across all sessions. When another session had the first question in the flat list, the QuestionPrompt would not render for the session being viewed even though it had its own pending question. Add getForSession() to the questions context and use it in SessionDetail to look up questions scoped to the current session.
thrawn-sh
force-pushed
the
fix/session-scoped-questions
branch
from
July 28, 2026 19:25
6895354 to
217d1ee
Compare
The SessionDetail useQuestions mocks did not expose getForSession, so every page test threw on the new session-scoped lookup. Add it to each mock and lock in the behaviour with regression coverage: the context helper resolves questions per session while another session owns the global current question, and SessionDetail renders the prompt for the session being viewed.
chriswritescode-dev
merged commit Jul 28, 2026
eac0909
into
chriswritescode-dev:main
1 of 2 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
currentQuestion was the first pending question globally across all sessions. When another session had the first question in the flat list, the QuestionPrompt would not render for the session being viewed even though it had its own pending question.
Add getForSession() to the questions context and use it in SessionDetail to look up questions scoped to the current session.
Summary
Type of Change
Checklist
pnpm lintpasses locallypnpm typecheckpasses locallySummary by CodeRabbit