Skip to content

Fix passenger count display and force client refresh of updated ticket UI#10

Open
RoToR003 with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-passenger-value-display
Open

Fix passenger count display and force client refresh of updated ticket UI#10
RoToR003 with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-passenger-value-display

Conversation

Copilot AI commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Пасажири in ticket cards could still show 0, and the Пасажири label appeared smaller than Дата/Час. The rendering logic and styling were corrected, then stale Service Worker caches were invalidated so clients receive the fix immediately.

  • Passenger value rendering

    • Removed offset-based subtraction from passenger display.
    • Render now uses normalized numeric fallback with minimum 1:
      ${Math.max(1, Number(ticket.passengers) || 0)}
  • Label typography alignment

    • Removed the dedicated reduced-size style for passenger label (.data-label-passengers).
    • Passenger label now uses the shared .data-label style, matching Дата and Час.
  • Cache invalidation / rollout

    • Bumped asset version references from index.js?v=54 to index.js?v=55 across app pages.
    • Bumped Service Worker registration URL to service-worker.js?v=55.
    • Updated Service Worker cache key and precache entry:
      const CACHE_NAME = 'prvt_cachev55_ticket_data_values_size';
      // ...
      './index.js?v=55',
    • This ensures old cached JS/SW does not continue serving pre-fix behavior.

@RoToR003 RoToR003 marked this pull request as ready for review April 4, 2026 16:40
Copilot AI review requested due to automatic review settings April 4, 2026 16:40

Copilot AI 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.

Pull request overview

This PR fixes incorrect passenger count rendering and aligns the “Пасажири” label styling with other ticket metadata labels, then forces rollout by invalidating cached assets via version bumps in HTML and the Service Worker.

Changes:

  • Fix passenger count display logic by removing the offset subtraction and enforcing a minimum displayed value of 1.
  • Align “Пасажири” label typography by removing the dedicated smaller label style and using the shared .data-label.
  • Invalidate stale client caches by bumping index.js and Service Worker registration/versioned cache keys from v=54 to v=55.

Reviewed changes

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

Show a summary per file
File Description
transport.html Bumps index.js query version to force clients to fetch updated JS.
settings.html Bumps index.js query version to force clients to fetch updated JS.
qr.html Bumps index.js query version to force clients to fetch updated JS.
payment.html Bumps index.js query version to force clients to fetch updated JS.
index.html Removes .data-label-passengers style and bumps index.js + SW registration versions.
index.js Fixes passenger display rendering and bumps SW registration URL version.
service-worker.js Updates cache name and precache URL for index.js?v=55 to invalidate old caches.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants