Skip to content

Standardize session-list tables on one canonical row builder #55

@KucharczykL

Description

@KucharczykL

Summary

Sessions are rendered by three different table layouts that have drifted apart. They should share one canonical row builder. Canonical target: the list_sessions 6-column table.

Current state

Where Columns How rows are built
games/views/session.py list_sessions 6: Name, Date, Duration, Device, Created, Actions row dict with row_id + hx attrs → TableRow
games/views/game.py _sessions_section (game detail) 4: Game, Date, Duration, Actions plain list, no row_id, no Device column
games/views/session.py _session_row_fragment 4: Name, Start, End, Duration hand-built Tr, no row_id

Each is maintained independently, so a change to the session row (new column, formatting, action button) has to be made in up to three places and silently drifts otherwise. This is the root cause of #53.

Desired state

  • One canonical row builder (extracted from list_sessions, e.g. session_row_data(session, device_list, csrf_token)) used everywhere a session row is rendered.
  • The game-detail sessions table migrates onto it (dropping/adapting columns as needed for that context, e.g. it may hide Device/Created but should not re-implement the row).
  • No hand-rolled session <tr> anywhere.

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions