Skip to content

Allow users to end an interview immediately without generating a report #100

Description

@jin11109

Description

After a mock interview ends, users must wait for the evaluation report before they can leave or start another interview.

Add a “Skip report and exit” option to the report-generation screen. This should let users immediately end the session without waiting for, displaying, or saving the report.

Suggested confirmation:

End this interview without waiting for a report? Any report in progress will be discarded and will not be saved.

Suggested implementation

Frontend

Add the action to the ending overlay in web/interview.html.

In web/interview.js, the handler should:

  • Mark the session as intentionally terminated.
  • Clear the ending and report timers.
  • Stop local media, integrity monitoring, and other session resources.
  • Send a skip-report signal when possible.
  • Disconnect from the LiveKit room.
  • Return to the home page.
  • Ignore any report that arrives after the session has been terminated.
  • Avoid creating an offline summary or report-history entry.

Existing cleanup logic such as stopEndingEscape(), stopEndingClock(), stopLocalMedia(), and room disconnection can be reused.

Backend

Report generation is currently awaited directly inside the interview event handler. While it is running, that handler cannot process a later cancellation message or candidate-disconnection event.

To support cancellation:

  1. Run report generation as a cancellable task while allowing the room event loop to continue.
  2. Add a cancellation signal for an explicit skip request or candidate disconnection.
  3. Race report completion against that signal using a cancellation token or tokio::select!.
  4. If cancellation wins, discard the result, do not publish a report, and clean up the session.

Cancellation should be best-effort because an external model request may already have started, but the application should stop waiting for it and must not publish or save its result.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions