Skip to content

Persist rows-per-page preferences per user#1175

Merged
Tim020 merged 1 commit into
devfrom
feature/persist-rows-per-page
Jun 9, 2026
Merged

Persist rows-per-page preferences per user#1175
Tim020 merged 1 commit into
devfrom
feature/persist-rows-per-page

Conversation

@Tim020

@Tim020 Tim020 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a table_page_sizes JSON column to UserSettings (Alembic migration included) so each user's per-table pagination preference is stored server-side
  • Preferences follow users across devices — important for team members who use laptops during rehearsals before moving to their fixed station
  • Both the Vue 3 (usePagination composable + Pinia store) and Vue 2 (paginationMixin + Vuex) clients are wired up across all ~20 paginated tables
  • Updates sync via the existing WS GET_USER_SETTINGS broadcast on PATCH — no local state mutations, all sessions stay consistent

How it works

  1. On component mount, reads the stored perPage value from userSettings.table_page_sizes[tableKey] (falls back to default 15)
  2. On change, fires PATCH /api/v1/user/settings with the merged table_page_sizes object
  3. Backend saves and broadcasts GET_USER_SETTINGS WS event to all sessions for that user
  4. All open sessions re-fetch settings — preference is now live everywhere

Test plan

  • Log in, navigate to a paginated table (e.g. Acts), change rows-per-page to 25
  • Hard-refresh — table should still show 25 rows per page
  • Log in on a second browser/device — same preference applies
  • Verify GET /api/v1/user/settings returns table_page_sizes: {"config_acts": 25}
  • Change per-page on a second table — confirm the two tables store independent values
  • Log out and back in — preferences persist across sessions

🤖 Generated with Claude Code

Adds a table_page_sizes JSON column to UserSettings so each user's
per-table pagination preference is stored server-side and follows them
across devices (laptop during rehearsals → fixed station for live shows).

The PATCH /api/v1/user/settings endpoint handles the new field automatically;
the existing WS broadcast (GET_USER_SETTINGS) syncs changes to all open
sessions for that user without any local state mutation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Tim020 Tim020 added the claude Issues created by Claude label Jun 9, 2026
@github-actions github-actions Bot added client Pull requests changing front end code server Pull requests changing back end code medium-diff client-v3 labels Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Client V3 Test Results

23 tests   23 ✅  0s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 32afb49.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Playwright E2E Results (chromium)

175 tests   175 ✅  1m 54s ⏱️
 14 suites    0 💤
  1 files      0 ❌

Results for commit 32afb49.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Client Test Results

128 tests   128 ✅  0s ⏱️
  6 suites    0 💤
  1 files      0 ❌

Results for commit 32afb49.

@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Python Test Results

  1 files    1 suites   2m 2s ⏱️
662 tests 662 ✅ 0 💤 0 ❌
667 runs  667 ✅ 0 💤 0 ❌

Results for commit 32afb49.

@Tim020 Tim020 enabled auto-merge (squash) June 9, 2026 00:25
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Playwright E2E Results (firefox)

175 tests   175 ✅  1m 53s ⏱️
 14 suites    0 💤
  1 files      0 ❌

Results for commit 32afb49.

@Tim020 Tim020 merged commit 49dee54 into dev Jun 9, 2026
45 of 48 checks passed
@Tim020 Tim020 deleted the feature/persist-rows-per-page branch June 9, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude Issues created by Claude client Pull requests changing front end code client-v3 medium-diff server Pull requests changing back end code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant