Skip to content

fix: improve responsive worklog table#574

Merged
CybotTM merged 8 commits into
mainfrom
agent/responsive-worklog-table
Jul 8, 2026
Merged

fix: improve responsive worklog table#574
CybotTM merged 8 commits into
mainfrom
agent/responsive-worklog-table

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 8, 2026

Copy link
Copy Markdown
Member

Related issues

Fixes #520
Fixes #571
Refs #572

Summary

  • Keep compact worklog dates identifiable and easy to scan: one compact rung
    showing an always two-digit day+month in the active locale/user order
    (05.01. / 15.01.), instead of a ragged mix (5.1. vs 10.1.) or a rung
    that flipped field order (ISO month-first 01-15 vs locale day-first).
  • Swap the reduced Date and Actions headers to accessible SVG icon headers when the responsive thinning levels apply.
  • Keep row action order stable by placing Info before the optional Prolong action, and make the Info icon visually distinct from the Prolong clock.
  • Replace the responsive table binary-search fit with a direct measured scan so the table can choose the smallest fitting level even when auto table layout is not perfectly monotonic.
  • Cache the compact Intl.DateTimeFormat instance and simplify the fit loop.

Screenshots

Captured from the real running e2e stack (/ui/tracking, user i.myself) via
e2e/tools/capture-screenshots.mjs — not a mock harness.

Full width Reduced width
Full-width worklog table Reduced-width worklog table

At reduced width the Date column compacts to a two-digit day.month (15.01.), the main nav
collapses to a Mehr menu, and the responsive thinning levels apply — the fix for #520.

The EntryClass border cues reflect the backend's actual class computation
(BaseTrackingController::calculateClasses): grey Pause on an entry with a gap before it,
teal Tageswechsel on a day's first entry, red Zeitüberschneidung on overlaps.

Note on the seed data (why the list spans 2024→2026)

These captures use the e2e seed, whose clock is frozen at 2024-01-15 while the fixture also
contains future-dated (2026) entries, and i.myself has show_future = 1. getEntriesByUser
returns day >= today − N with no upper bound when show_future is set, so every future entry
appears regardless of the "N days" window — hence multiple calendar days show even at "3 Tage".
The seed also only classifies the 2024-01-15 day, so day-break cues are absent on the unclassified
2026 days. Both are pre-existing seed/behaviour artifacts, not changes in this PR (which only
touches the responsive table layout and the compact date format).

Validation

  • bun run test src/pages/Tracking.test.tsx passed: 47/47.
  • bun run lint and bun run typecheck passed.
  • bun run build succeeds and the SPA renders on the live e2e stack (port 8766).
  • Border colours verified against computed styles (Pause rgb(154,160,166), Tageswechsel rgb(0,136,154)).

Notes

  • A reusable screenshot helper (npm run screenshots) was added and documented in
    docs/testing.md.
  • An earlier revision of this PR shipped screenshots rendered from a temporary mocked table
    harness; those had incorrect border cues and have been replaced with the real captures above.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request improves the responsiveness and localization of the tracking table. Key changes include replacing the binary search for table fitting with a robust linear scan, introducing compact date formatting based on user preferences (locale or custom patterns) instead of using weekday names, adding icon-based column headers for date and actions on narrow screens, and reordering row actions. Feedback focuses on optimizing performance by caching Intl.DateTimeFormat instances in compactDateByLocale and simplifying the table-fitting loop to eliminate a redundant function call.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread frontend/src/pages/Tracking.tsx Outdated
Comment thread frontend/src/pages/Tracking.tsx Outdated
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.14%. Comparing base (39c3b6c) to head (216824c).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #574   +/-   ##
=========================================
  Coverage     82.14%   82.14%           
  Complexity     3378     3378           
=========================================
  Files           241      241           
  Lines          9210     9210           
=========================================
  Hits           7566     7566           
  Misses         1644     1644           
Flag Coverage Δ
integration 54.10% <ø> (ø)
unit 46.60% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
@CybotTM CybotTM force-pushed the agent/responsive-worklog-table branch from 93f03f6 to 116f99b Compare July 8, 2026 05:39
CybotTM added 2 commits July 8, 2026 07:44
Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Extract the ad-hoc worklog screenshot capture into a documented, reusable
CLI (e2e/tools/capture-screenshots.mjs) exposed via the npm "screenshots"
script. Logs in with the E2E defaults, waits for the target selector, and
captures desktop/reduced viewport PNGs against the running stack. Documented
in docs/testing.md.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Comment thread e2e/tools/capture-screenshots.mjs Fixed
CybotTM added 4 commits July 8, 2026 08:23
Route the screenshot helper's login defaults through an envOr() indirection,
mirroring e2e/helpers/auth.ts, so no password literal is assigned directly to
a credential field (clears SonarCloud javascript:S2068). The defaults remain
the public LDAP test fixtures.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
The previous screenshots were rendered from a temporary mocked table harness
with fabricated demo data, so their EntryClass border cues were wrong (red/teal
on the wrong rows). Recapture the real /ui/tracking page from the running e2e
stack via e2e/tools/capture-screenshots.mjs, where the borders reflect the
backend's actual class computation: grey PAUSE on a gapped entry and teal
DAYBREAK on the day's first entry.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
The compact worklog date rungs mixed one- and two-digit fields (5.1. vs
10.1.) and flipped field order between rungs (ISO month-first 01-15 for the
mid rung vs locale day-first for the short rung), which is hard to scan down
the column. Collapse the two compact rungs into one always-zero-padded,
locale-ordered two-digit day+month (05.01. / 15.01.) and drop the now-dead
non-padded/numeric format branches.

Refs #520.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>

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 improves the responsiveness and usability of the worklog table on /ui/tracking, addressing issues around compact date readability (#520) and action/icon clarity (#571), and adds a small helper to capture real-stack screenshots for documentation/debugging.

Changes:

  • Replace the previous multi-rung date “ladder” with a compact, zero-padded day+month format and add accessible icon headers at reduced widths.
  • Keep row action ordering stable (Info before optional Prolong) and update the Info icon to be visually distinct.
  • Replace the binary-search thinning fit logic with a direct scan and add a Playwright-based screenshot capture helper + docs.

Reviewed changes

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

Show a summary per file
File Description
package.json Adds a screenshots script to run the new capture helper.
frontend/src/styles/app.css Updates responsive thinning CSS (compact date rung + icon headers).
frontend/src/pages/Tracking.tsx Implements compact date formatting, icon headers, action ordering, and revised fit loop.
frontend/src/pages/Tracking.test.tsx Updates/extends tests for compact dates, headers accessibility, and action ordering.
frontend/src/lib/icons.tsx Updates Info glyph and adds Calendar/Tools header icons.
e2e/tools/capture-screenshots.mjs New CLI helper for capturing screenshots from a running e2e stack.
docs/testing.md Documents how to run the screenshot helper.

Comment thread frontend/src/pages/Tracking.tsx
Comment thread frontend/src/pages/Tracking.tsx
Comment thread frontend/src/styles/app.css
- Use displayDate() for the date <td> title instead of dateParts().full, so
  the tooltip does not recompute the compact-date Intl formatting.
- Match the shared .visually-hidden recipe (margin/padding reset) on the
  responsive th-label hiding rule.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

@CybotTM CybotTM merged commit a44ee45 into main Jul 8, 2026
26 checks passed
@CybotTM CybotTM deleted the agent/responsive-worklog-table branch July 8, 2026 09:59
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.

[Feature]: Icons for actions "Info" and "Verlängern" hard to distinguish [Bug]: Date + actions not displayed correctly in comfortable view

3 participants