Skip to content

Manchester | 26-ITP-Sep | Salah Alsabhi | Sprint 3 | Alarm clock - #1527

Open
salahalsabhi wants to merge 7 commits into
CodeYourFuture:mainfrom
salahalsabhi:alarmclock
Open

salahalsabhi wants to merge 7 commits into
CodeYourFuture:mainfrom
salahalsabhi:alarmclock

Conversation

@salahalsabhi

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Task code

CYF-1098

Changelist

  • Title set to "Alarm clock app"
  • setAlarm reads seconds, shows mm:ss, counts down every 1s
  • Plays alarm at 00:00; Stop pauses sound and resets background
  • Background turns red when alarm finishes (stretch)
  • All 5 tests pass

Questions

No questions.

@salahalsabhi salahalsabhi added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 15, 2026
@LonMcGregor LonMcGregor added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Nov 16, 2026
}

const input = document.getElementById("alarmSet");
let remaining = Number(input.value);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What happens to the countdown when Set Alarm is clicked with the number field empty?

To "like" or "dislike" this comment, please follow this link

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good catch. Empty or invalid input is ignored: setAlarm returns early, so no countdown and no sound. Fixed in 458b940.

@cyf-ai-code-reviewer cyf-ai-code-reviewer Bot added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Nov 16, 2026
@cyf-ai-code-reviewer

Copy link
Copy Markdown

The CYF AI review has left comments. It will only review a PR one time. When you have addressed these comments, please request review again and a volunteer will take a look.

@salahalsabhi salahalsabhi added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 16, 2026
@Prabhanshu-dev
Prabhanshu-dev self-requested a review November 23, 2026 14:57
@@ -1,4 +1,40 @@
function setAlarm() {}

@Prabhanshu-dev Prabhanshu-dev Nov 24, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please add the relevant test cases mentioned in the sprint for the alarmClock app in the separate test file.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sorry for the mistake, conflict markers removed. All 5 sprint tests in alarmclock.test.js pass (npm test -- --selectProjects alarmclock). Ready for re-review.

@Prabhanshu-dev Prabhanshu-dev Nov 24, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

okay sure. Please update the status & re-request for review. Will review it again accordingly.

@Prabhanshu-dev Prabhanshu-dev removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 24, 2026
@github-actions

This comment has been minimized.

@salahalsabhi salahalsabhi added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 24, 2026
@salahalsabhi

Copy link
Copy Markdown
Author

The sprint already ships Sprint-3/alarmclock/alarmclock.test.js with 5 tests and a DO NOT MODIFY header, so I did not change that file (unchanged files do not appear under Files changed).

Locally: npm test -- --selectProjects alarmclock → 5 passed.

Implementation is only in alarmclock.js (+ title in index.html). Ready for re-review.

@salahalsabhi

salahalsabhi commented Nov 25, 2026 via email

Copy link
Copy Markdown
Author

@Prabhanshu-dev

Copy link
Copy Markdown

Thanks for the implementation! I've reviewed the changes against the acceptance criteria. The countdown logic and time formatting look good.

A few points to consider:

  1. Continuous alarm playback: Could you please verify that the alarm sound continues playing until the user clicks the "Stop Alarm" button, as required by the acceptance criteria?

  2. Zero-second input: When the user enters 0 as the alarm time, the current implementation waits one second before triggering the alarm and briefly displays 00:-1. Could you handle this case so the alarm triggers immediately at 00:00?

  3. Initial state: Please ensure that the heading displays Time Remaining: 00:00 when the page first loads and that no alarm sound plays.

Please confirm the above points.

@salahalsabhi

salahalsabhi commented Nov 25, 2026 via email

Copy link
Copy Markdown
Author

@Prabhanshu-dev Prabhanshu-dev removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 25, 2026
@Prabhanshu-dev
Prabhanshu-dev self-requested a review November 25, 2026 14:40
@Prabhanshu-dev

Copy link
Copy Markdown

ok

@Prabhanshu-dev Prabhanshu-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed the implementation against the acceptance criteria. The countdown, continuous alarm playback, Stop Alarm functionality, zero-second handling, and initial page state look good.

All requirements appear to be satisfied.

@salahalsabhi

salahalsabhi commented Nov 25, 2026 via email

Copy link
Copy Markdown
Author

@Prabhanshu-dev Prabhanshu-dev removed the Reviewed Volunteer to add when completing a review with trainee action still to take. label Nov 25, 2026
@Prabhanshu-dev Prabhanshu-dev added the Complete Volunteer to add when work is complete and all review comments have been addressed. label Nov 25, 2026
@Prabhanshu-dev

Copy link
Copy Markdown

Updated the PR from reviewed to Complete status

@salahalsabhi

salahalsabhi commented Nov 25, 2026 via email

Copy link
Copy Markdown
Author

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

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants