fix(interview): repair interview-history endpoint + show past interviews in Step 5#692
Open
alreadyhavefeel wants to merge 1 commit into
Open
fix(interview): repair interview-history endpoint + show past interviews in Step 5#692alreadyhavefeel wants to merge 1 commit into
alreadyhavefeel wants to merge 1 commit into
Conversation
…terviews in UI The interview-history feature already existed (interviews are recorded to each platform's OASIS sqlite DB and `POST /api/simulation/interview/history` reads them) but was broken on two fronts: 1. Backend crash: get_interview_history sorts merged twitter+reddit results by "timestamp", but the two platforms store created_at with different types (one int-like, one datetime string), raising "'<' not supported between instances of 'int' and 'str'". Coerce the sort key to str so mixed-type timestamps sort safely. 2. Step 5 (Interaction) never loaded that history, so past interviews vanished on reload. Add getInterviewHistory() and load it on mount, seeding the per-agent chat cache (chronological, prompt-prefix stripped, deduped across platforms) so selecting an agent shows prior Q&A. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
guo-bc
approved these changes
Jun 22, 2026
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.
Summary
The interview-history capability already exists — interviews are written to each platform's OASIS SQLite DB and
POST /api/simulation/interview/historyreads them back — but it was broken in two places, so past interviews never appeared in the UI.Bug 1 — backend endpoint crashes on mixed-type timestamps
SimulationRunner.get_interview_historymerges twitter + reddit results and sorts bytimestamp. The two platform DBs storecreated_atwith different types (one comes back int-like, the other a datetime string), so the sort raises:Any multi-platform history query (the default) 500s. Fix: coerce the sort key to
str.Bug 2 — Step 5 never loads the history
Step5Interaction.vueonly kept interviews in an in-memory cache for the current session, so they vanished on reload and the persisted history was never surfaced. This wires it up:getInterviewHistory(simulationId, opts)inapi/simulation.js→ calls the existingPOST /api/simulation/interview/history.Testing
Scope
Backend: 1-line fix in
simulation_runner.py. Frontend: additive API helper + a mount-time loader inStep5Interaction.vue. No API contract or schema changes.