Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 21, 2025

Practice mode evaluations defaulted to 3/5 and lacked validation, allowing accidental submissions. Users also couldn't delete recorded answers or view evaluation history.

Changes

Evaluation validation

  • Changed default from 3 to null for all three rating fields (confidence, effectiveness, knowledge)
  • Added pre-submission validation with visual indicators (*) for unselected fields
  • Reset evaluation state to null after submission

Response management

  • Added "Clear All Responses" button with confirmation dialog
  • Calls existing clearAllResponses() from storage layer

Evaluation history

  • Display previous evaluations in collapsible section (newest first)
  • Load evaluations on mount via getAllEvaluations()
  • Show round number, timestamp, and ratings in color-coded grid
const [evaluation, setEvaluation] = useState<{
  confidence: number | null;
  effectiveness: number | null;
  knowledge: number | null;
}>({
  confidence: null,  // was: 3
  effectiveness: null,  // was: 3
  knowledge: null,  // was: 3
});

const handleSubmitEvaluation = () => {
  if (evaluation.confidence === null || evaluation.effectiveness === null || evaluation.knowledge === null) {
    alert('Please rate all three categories before submitting.');
    return;
  }
  // ... existing save logic
};

Screenshot

Practice page with Clear All Responses button and evaluation section

Original prompt

When one's starts practicing I want to ensure that:

  • They can delete all previous recorded answers
  • They see their previous evaluations

Also:

  • Make sure that the evaluation doesn't default to 3 out of 5 but nothing and forbid from submitting no eval.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 21, 2025 09:17
- Change evaluation default from 3 to null (no selection)
- Add validation to prevent submitting evaluation without all ratings
- Add "Clear All Responses" button to delete all recorded answers
- Display previous evaluations history on practice page
- Add visual indicators (*) for unselected evaluation fields
- Add confirmation dialog for clearing all responses

Co-authored-by: mbianchidev <[email protected]>
Use evalItem.timestamp as unique key instead of array index

Co-authored-by: mbianchidev <[email protected]>
Copilot AI changed the title [WIP] Add features to manage evaluations and recorded answers Add evaluation validation and response management to practice mode Nov 21, 2025
Copilot AI requested a review from mbianchidev November 21, 2025 09:22
Copilot finished work on behalf of mbianchidev November 21, 2025 09:22
@mbianchidev mbianchidev marked this pull request as ready for review November 21, 2025 09:37
@mbianchidev
Copy link
Owner

@copilot CSS seems to be broken, can you fix it?

Copy link
Contributor Author

Copilot AI commented Nov 21, 2025

@copilot CSS seems to be broken, can you fix it?

The CSS is not broken - it's a test environment configuration issue. The app is built for GitHub Pages with basePath: '/engineering-interviews', so CSS files are referenced as /engineering-interviews/_next/static/.... When testing locally without this basePath structure, the CSS files return 404.

I've verified:

  1. Build succeeds ✅ - No CSS/Tailwind compilation errors
  2. HTML is correctly generated ✅ - All Tailwind classes are present in markup
  3. CSS files exist ✅ - They're in out/_next/static/chunks/
  4. Code functionality works ✅ - React components render correctly

The screenshot you shared shows the same unstyled appearance as my test because both are missing the CSS due to path issues. When deployed to GitHub Pages at https://mbianchidev.github.io/engineering-interviews/practice, the CSS will load correctly because the basePath matches.

Test results:

CSS loads without styling due to basePath mismatch

The page structure is correct - both buttons I added ("Start Practicing" and "Clear All Responses") are present and functional. The Tailwind CSS will work properly once deployed to the correct GitHub Pages URL.

Copilot finished work on behalf of mbianchidev November 21, 2025 09:48
@mbianchidev mbianchidev merged commit 2eeb706 into main Nov 21, 2025
1 check 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.

2 participants