Skip to content

Async PI fixes from user study feedback - #1435

Merged
bnmnetp merged 2 commits into
RunestoneInteractive:mainfrom
sethbern:async-pi-fixes
Aug 27, 2026
Merged

Async PI fixes from user study feedback#1435
bnmnetp merged 2 commits into
RunestoneInteractive:mainfrom
sethbern:async-pi-fixes

Conversation

@sethbern

Copy link
Copy Markdown
Contributor

This fixes several UI/UX issues that were identified from user studies, along with some prompt tweaking.

  • The LLM peer wasn't always getting the question text or choices at all
  • Prompt tweaks so the peer engages the student's actual reasoning instead of jumping straight to a scenario, and doesn't just deflect if they say they're confused
  • Show a handful of saved justifications at random, each labeled with the answer it argued for on their first PI vote
  • Some UI polish: theme descriptions, bigger textarea, layout fixes

@sethbern
sethbern requested a review from bnmnetp as a code owner August 26, 2026 19:04
@bnmnetp

bnmnetp commented Aug 26, 2026

Copy link
Copy Markdown
Member

Here is what I see after building and testing
Screenshot 2026-08-26 at 5 06 37 PM
Even after clicking "Check Me" -- infact I get the same error about currAnswer.indexOf each time I click "Check Me"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses user-study feedback for the async Peer Instruction (“After Class”) experience by improving what context the AI peer receives, refining the AI prompting/flow rules, and polishing the UI for readability and navigation.

Changes:

  • Backend: enrich async peer context building (parse question_json for statement/options) and return per-justification “first vote” answer labels.
  • Frontend: display a random subset of classmates’ justifications with an answer tag (when available), and improve theme-picker option presentation (name + description).
  • UI polish: layout/spacing fixes, larger/resizeable justification textarea, and clearer AI-peer disclaimers/instructions.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
components/rsptx/templates/assignment/student/peer_async.html UI/layout tweaks; theme-picker option descriptions; show tagged random classmate justifications with associated first-vote answer.
bases/rsptx/assignment_server_api/routers/peer.py Parse question_json for question/choices; add vote-to-justification answer labeling; update analogy/generic prompt rules and add HTML-to-text conversion helper.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread components/rsptx/templates/assignment/student/peer_async.html Outdated
Comment thread bases/rsptx/assignment_server_api/routers/peer.py
Comment thread components/rsptx/templates/assignment/student/peer_async.html Outdated
@sethbern

Copy link
Copy Markdown
Contributor Author

I think I figured out what was causing this. For previously answered questions, restoreAnswers loads that value from the server as a string but for new questions, it stays as the raw Number from givenArray[0], which causes the error. That also explains why I did not catch this when I tested locally or during the study since the questions I tested already had stored answers.

I also addressed the copilot comments.

@bnmnetp

bnmnetp commented Aug 27, 2026

Copy link
Copy Markdown
Member

Ah, yes that seemingly simple change to accommodate an author that wanted more than 10 choices for an MCQ has led to more little hidden troubles.

I'll try to get this merged a bit later today.

@bnmnetp
bnmnetp merged commit ea82ee2 into RunestoneInteractive:main Aug 27, 2026
2 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.

3 participants