NotePace v0.5.4 — Incremental History Scanner
=============================================

Purpose
-------
This test release preserves the frozen clinical workflows and the v0.5.3.6
manual date-lock safety separation. It adds an on-demand 30- or 90-day history
scan that rebuilds Note Completion History directly from eCW on the current
device without requiring a NotePace account.

What changed from v0.5.3.6
--------------------------
- A new Scan unlocked notes submenu offers Last 30 days and Last 90 days.
- Saturdays and Sundays are excluded before scanning begins.
- Previously completed dates are skipped. Today, unscanned dates, dates with
  unlocked notes, and dates with unreadable rows are checked again.
- Dates with a stable empty appointment grid are saved as no active
  appointments and quickly passed over.
- Progress shows the current eligible date and overall position.
- Stop current scan finishes the current date and returns to the starting date.
- Interrupted or stopped scans can be resumed from the menu.
- Completion displays a NotePace alert with the number of unlocked notes and
  affected dates, plus a direct View history button.
- The starting appointment date is restored after completion whenever eCW
  confirms the calendar navigation.
- The scanner never selects patient rows, opens the lock menu, acknowledges
  lock warnings, or starts the note-lock sequence.
- Opening a date from Note Completion History or the previous-day reminder now
  navigates to that date and rescans the appointment list only. It never starts
  the bulk lock sequence, selects appointment rows, or acknowledges warnings.
- The orange button displays the currently confirmed appointment date, such as
  LOCK 09/15 NOTES.
- The bulk lock sequence starts only when the clinician manually clicks that
  orange date-specific button.
- NotePace chooses the innermost visible day control, avoiding duplicate day
  numbers created by eCW's nested calendar markup.
- The same complete mouse-event sequence used for the calendar icon is now
  used to select the requested day.
- Month and year dropdown changes must be confirmed and stable before the day
  is selected, including dates in the previous month.
- NotePace distinguishes the small white next-day arrow from the larger blue
  calendar square shown immediately to its right.
- Calendar detection now includes older eCW image inputs and Angular wrapper
  controls, even when the icon itself has no readable label.
- NotePace targets the center of the blue calendar square and sends the full
  mouse-over, mouse-down, mouse-up, and click sequence to the deepest element
  at that point so the event reaches whichever eCW layer owns the handler.
- NotePace now confirms that the eCW calendar actually opened after clicking
  the small blue calendar button.
- If eCW does not respond, NotePace reacquires the current date toolbar and
  safely retries the calendar button up to three times.
- The open calendar remains visible briefly before the requested date is
  selected, making the navigation step observable during testing.
- The small blue calendar button immediately after the Office Visits date
  arrows is identified by both its icon metadata and its position.
- When the calendar image has no readable label, NotePace recognizes the stable
  eCW order: date, next-day arrow, then calendar button.
- A requested date may be later than the date currently displayed, provided it
  is not in the future and remains within the last 90 days.
- OPEN DATE opens the eCW calendar and selects the requested month, year,
  and exact day directly.
- NotePace no longer rewrites the visible date field or walks backward through
  dates one day at a time.
- Gray adjacent-month dates and disabled calendar dates are excluded.
- A matching date alone is not accepted as success. NotePace also requires
  evidence that the appointment grid refreshed and became stable and readable.
- If the calendar, exact day, requested date, or refreshed schedule cannot be
  verified, NotePace stops before selecting any appointment rows.
- Modern I, the two recognized eCW warning acknowledgements, and final lock-icon
  verification remain unchanged.

Install for testing
-------------------
1. Extract the ZIP into a permanent folder. Do not select the ZIP itself when
   using Load unpacked.
2. Open chrome://extensions.
3. Turn on Developer mode.
4. Remove or turn off the older unpacked NotePace test build.
5. Click Load unpacked and select the extracted folder containing manifest.json.
6. Confirm the extension details show version 0.5.4.

History scanner test
--------------------
1. Open the eCW Office Visits appointment screen and leave it open.
2. Open the NotePace menu, choose Scan unlocked notes, then Scan last 30 days.
3. Confirm weekends and previously completed dates are not added to the queue.
4. Confirm the calendar moves among eligible dates without selecting patient
   rows, opening Lock Progress Note, or acknowledging any eCW lock warning.
5. Confirm the progress message advances after each verified date.
6. Test Stop current scan; confirm the current date finishes, the starting date
   is restored, and Resume previous scan appears in the menu.
7. Resume and confirm the scan continues from the next unfinished date.
8. At completion, confirm the alert reports unlocked notes and affected dates,
   View history opens the aggregate report, and the starting date is restored.
9. Repeat with Scan last 90 days when an extended review is needed.

Calendar navigation test
------------------------
1. Open the eCW Office Visits appointment screen.
2. Open Note Completion History and choose OPEN DATE for a prior date with
   known unlocked notes.
3. Confirm the eCW calendar opens and jumps directly to that month, year, and
   day without stepping through every intervening date.
4. Confirm the Office Visits date and appointment rows both refresh to the
   selected day and that NotePace does not select any rows or open the lock menu.
5. Confirm the orange button changes to LOCK MM/DD NOTES for that date.
6. Review the schedule, manually click the orange button, and confirm only the
   selected day's rows are used by the lock workflow.
7. Confirm the final message and Note Completion History show the selected
   day's updated locked and unlocked counts.
8. Repeat with a date in the prior month.
9. While viewing a schedule date earlier than the unresolved date, repeat the
   test and confirm NotePace can move forward to that still-recent date.
10. If navigation cannot be verified, confirm NotePace stops and reports that
   nothing was locked.

Safety and privacy
------------------
- Only a clinician's manual click on the orange LOCK MM/DD NOTES button starts
  a bulk lock run. OPEN DATE performs navigation and scanning only.
- The 30/90-day scanner never initiates note locking. The orange lock button is
  disabled while the scanner is running.
- Review the appointment date, appointment list, and final lock status in eCW.
- Counts reflect the last schedule scan and are not a permanent audit record.
- Cross-device synchronization is optional and off by default.
- Patient names, chart IDs, diagnoses, and note contents are not stored in the
  note-completion history.
- NotePace is a workflow aid and is not affiliated with eClinicalWorks or
  Sunoh.ai.

Keep frozen v0.5.1 and the earlier test ZIPs unchanged while v0.5.4 is tested.
