Skip to content

feat/134-max-question-reoccurrences#232

Merged
olios123 merged 18 commits intodevfrom
feat/134-max-question-reoccurrences
Mar 19, 2026
Merged

feat/134-max-question-reoccurrences#232
olios123 merged 18 commits intodevfrom
feat/134-max-question-reoccurrences

Conversation

@olios123
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings March 18, 2026 14:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new user setting to cap how many times a question may reoccur in a quiz session, wiring it into session progress calculations and exposing it in the profile settings UI.

Changes:

  • Extend UserSettings with max_question_reoccurrences and provide a default value.
  • Enforce the cap in getRemainingAttempts() and factor out a shared question “count” helper.
  • Add UI controls (input + slider) for the new setting in the profile settings form.

Reviewed changes

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

File Description
src/types/user.ts Adds max_question_reoccurrences to the settings type and defaults.
src/lib/session-utils.ts Applies the max-reoccurrence cap in remaining-attempts logic and introduces getQuestionAnsweredCount().
src/components/quiz/question-card.tsx Reuses the shared count helper for the “times shown” badge.
src/components/profile/settings-form.tsx Adds input/slider controls to edit max_question_reoccurrences.

You can also share your feedback on Copilot code review. Take the survey.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Mar 19, 2026
Copilot AI review requested due to automatic review settings March 19, 2026 08:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new user setting to cap how many times a question can reappear in a single quiz session, wiring it through quiz session logic and the profile settings UI.

Changes:

  • Extend UserSettings with max_question_reoccurrences and a default value.
  • Enforce the max reoccurrence cap in getRemainingAttempts() and refactor “times shown” counting into a shared helper.
  • Add a new “Maksymalna liczba powtórzeń pytania” control (input + slider) in the profile settings form.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
src/types/user.ts Adds max_question_reoccurrences to settings type + default.
src/lib/session-utils.ts Applies max-cap in remaining-attempts computation; introduces shared count helper.
src/components/quiz/question-card.tsx Uses shared helper to display “times shown” badge.
src/components/profile/settings-form.tsx Adds UI controls to edit the new setting.

You can also share your feedback on Copilot code review. Take the survey.

@olios123 olios123 requested a review from Copilot March 19, 2026 09:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new user setting to cap how many times a single question can reappear during a quiz session, and reuses a shared helper to display/compute per-question attempt counts.

Changes:

  • Extend UserSettings with max_question_reoccurrences (nullable) and add a default value.
  • Enforce the max reoccurrence limit in quiz session computations (getRemainingAttempts).
  • Reuse a shared helper for “times shown/answered” counting in QuestionCard and introduce UI controls for the new setting in the profile settings form.

Reviewed changes

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

File Description
src/types/user.ts Adds max_question_reoccurrences to user settings and provides a default.
src/lib/session-utils.ts Enforces a per-question max appearance/answer limit and introduces a shared counting helper.
src/components/quiz/question-card.tsx Switches to the shared counting helper for the “times shown” badge.
src/components/profile/settings-form.tsx Adds input+slider controls for configuring max_question_reoccurrences and updates existing slider commit behavior.

You can also share your feedback on Copilot code review. Take the survey.

Copilot AI review requested due to automatic review settings March 19, 2026 15:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 introduces a new user setting to cap how many times a question can reoccur during a quiz session, and updates both the quiz logic and profile settings UI to support it.

Changes:

  • Add max_question_reoccurrences to UserSettings with a default value.
  • Enforce the max reoccurrence limit in quiz session progress calculations.
  • Refactor question “times shown” counting into a shared helper and update the profile settings UI to edit the new value.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
src/types/user.ts Extends UserSettings with max_question_reoccurrences and adds a default value.
src/lib/session-utils.ts Applies the max reoccurrence cap when computing remaining attempts; adds getQuestionAnsweredCount.
src/components/quiz/question-card.tsx Reuses getQuestionAnsweredCount instead of duplicating the counting logic.
src/components/profile/settings-form.tsx Adds UI control for max reoccurrences and replaces sliders with +/- + numeric inputs.

You can also share your feedback on Copilot code review. Take the survey.

Copilot AI review requested due to automatic review settings March 19, 2026 15:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new user setting to cap how many times a question can reappear during a quiz session, and updates quiz/session utilities + UI to respect and display appearance counts.

Changes:

  • Extend UserSettings with max_question_reoccurrences and add a default value.
  • Enforce the max reoccurrence limit in getRemainingAttempts() and extract shared counting logic into getQuestionAnsweredCount().
  • Update quiz question UI to use the shared count helper, and revamp profile settings UI to allow editing the new value.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

File Description
src/types/user.ts Adds max_question_reoccurrences, adjusts settings change typing, updates defaults.
src/lib/session-utils.ts Enforces max reoccurrences in remaining-attempt logic; introduces getQuestionAnsweredCount().
src/components/quiz/question-card.tsx Reuses getQuestionAnsweredCount() instead of duplicating reduce logic.
src/components/profile/settings-form.tsx Replaces sliders with +/- controls and adds UI for max reoccurrences.

You can also share your feedback on Copilot code review. Take the survey.

@olios123
Copy link
Copy Markdown
Member Author

@MarvinRucinski zobacz sobie czy wszystko pasi, poklikaj sobie w guziczki :)

@olios123 olios123 linked an issue Mar 19, 2026 that may be closed by this pull request
@MarvinRucinski
Copy link
Copy Markdown
Contributor

Moje ulubione zadanie - klikanie guziczków
Wszystko pasi - daje approve

@olios123
Copy link
Copy Markdown
Member Author

Będę dawał ci więcej takich zadanek :>

@olios123 olios123 merged commit 6fffca1 into dev Mar 19, 2026
5 checks passed
@olios123 olios123 deleted the feat/134-max-question-reoccurrences branch March 19, 2026 16:38
Antoni-Czaplicki pushed a commit that referenced this pull request Mar 21, 2026
* feat: add max question reoccurrences slider

* feat: add max question reoccurrences slider

* feat: max question reoccurrences logic

* refactor: use utils function

* refactor: slider change

* feat: add slider descriptions

* refactor: edit session answers count logic

* refactor: upgrade save slider values

* refactor: upgrade settings logic

* refactor: upgrade settings slider logic

* refactor: change default settings

* feat: new settings form

* refactor: responsive

* fix: bug fixes

* refactor: settings change

* refactor: buttons change
olios123 added a commit that referenced this pull request Apr 2, 2026
* feat: add max question reoccurrences slider

* feat: add max question reoccurrences slider

* feat: max question reoccurrences logic

* refactor: use utils function

* refactor: slider change

* feat: add slider descriptions

* refactor: edit session answers count logic

* refactor: upgrade save slider values

* refactor: upgrade settings logic

* refactor: upgrade settings slider logic

* refactor: change default settings

* feat: new settings form

* refactor: responsive

* fix: bug fixes

* refactor: settings change

* refactor: buttons change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] Ustawienie maksymalnej liczby powtórzeń pytania

3 participants