fix(web): handler correctness, dedup helpers, drop dead web types #133

Merged
David merged 2 commits from fix/bunyip-78 into main 2026-06-13 13:15:48 +02:00
Owner

Fix bunyip-web handler bugs, collapse duplicated helpers to one source, advance the OCI copy-button off the BFF-trust onclick pattern, and delete dead web DTOs/helpers.

Handler correctness: membership_badge now renders a Grace Period warning badge and the membership card has guard includes GracePeriod so grace members see their plan; login_get and register_get relay the refreshed session cookie via redirect_cookies on the already-signed-in bounce instead of dropping it; the settings ?ok=/?error= messages are clamped to ~256 bytes before render; the confirm_email comment promising a cookie-clear that never happened is removed.

OCI copy button: command_block no longer splices API-sourced registry/reference into the inline onclick. The command lives in a Maud-escaped data-copy attribute and a single static COPY_CMD_JS handler reads it from this.dataset.copy at click time, so no API data ships as executable content. Trust model documented on the helper.

Dedup: one urlenc lives in util and replaces the three drifted local copies (dashboard, admin handler, admin API); base_domain wrapper dropped for domain_or_localhost; auth_pages INPUT_CLASS const and its inline copies fold into dashboard_input(); PaginatedResponse keeps a single page_size field; feedback_status_str is replaced by FeedbackStatus::as_str (with an AsRef impl).

Dead code removed: spinner(), simple_page(), downloads_for_app() + AppDownloadsResponse, FeedbackSubmissionResponse, AuthResponse.access_token, hx_redirect(), and the banner-only api_url clone (cfg is now an Arc read directly in the banner). AdminFeedbackDetail is retained: it became live after the issue snapshot (feedback detail view) and removing it would break the build.

#BUNYIP-78

Branch-backed replacement for #119 (original was AGit/branchless, no merge button once behind main). Rebased clean onto current main.

Fix bunyip-web handler bugs, collapse duplicated helpers to one source, advance the OCI copy-button off the BFF-trust onclick pattern, and delete dead web DTOs/helpers. Handler correctness: membership_badge now renders a Grace Period warning badge and the membership card `has` guard includes GracePeriod so grace members see their plan; login_get and register_get relay the refreshed session cookie via redirect_cookies on the already-signed-in bounce instead of dropping it; the settings `?ok=`/`?error=` messages are clamped to ~256 bytes before render; the confirm_email comment promising a cookie-clear that never happened is removed. OCI copy button: command_block no longer splices API-sourced registry/reference into the inline onclick. The command lives in a Maud-escaped data-copy attribute and a single static COPY_CMD_JS handler reads it from this.dataset.copy at click time, so no API data ships as executable content. Trust model documented on the helper. Dedup: one urlenc lives in util and replaces the three drifted local copies (dashboard, admin handler, admin API); base_domain wrapper dropped for domain_or_localhost; auth_pages INPUT_CLASS const and its inline copies fold into dashboard_input(); PaginatedResponse keeps a single page_size field; feedback_status_str is replaced by FeedbackStatus::as_str (with an AsRef<str> impl). Dead code removed: spinner(), simple_page(), downloads_for_app() + AppDownloadsResponse, FeedbackSubmissionResponse, AuthResponse.access_token, hx_redirect(), and the banner-only api_url clone (cfg is now an Arc read directly in the banner). AdminFeedbackDetail is retained: it became live after the issue snapshot (feedback detail view) and removing it would break the build. #BUNYIP-78 Branch-backed replacement for #119 (original was AGit/branchless, no merge button once behind main). Rebased clean onto current main.
fix(web): handler correctness, dedup helpers, drop dead web types
All checks were successful
Check / fmt / clippy / build / test (pull_request) Successful in 1m7s
7bee49432e
Fix bunyip-web handler bugs, collapse duplicated helpers to one source, advance the OCI copy-button off the BFF-trust onclick pattern, and delete dead web DTOs/helpers.

Handler correctness: membership_badge now renders a Grace Period warning badge and the membership card `has` guard includes GracePeriod so grace members see their plan; login_get and register_get relay the refreshed session cookie via redirect_cookies on the already-signed-in bounce instead of dropping it; the settings `?ok=`/`?error=` messages are clamped to ~256 bytes before render; the confirm_email comment promising a cookie-clear that never happened is removed.

OCI copy button: command_block no longer splices API-sourced registry/reference into the inline onclick. The command lives in a Maud-escaped data-copy attribute and a single static COPY_CMD_JS handler reads it from this.dataset.copy at click time, so no API data ships as executable content. Trust model documented on the helper.

Dedup: one urlenc lives in util and replaces the three drifted local copies (dashboard, admin handler, admin API); base_domain wrapper dropped for domain_or_localhost; auth_pages INPUT_CLASS const and its inline copies fold into dashboard_input(); PaginatedResponse keeps a single page_size field; feedback_status_str is replaced by FeedbackStatus::as_str (with an AsRef<str> impl).

Dead code removed: spinner(), simple_page(), downloads_for_app() + AppDownloadsResponse, FeedbackSubmissionResponse, AuthResponse.access_token, hx_redirect(), and the banner-only api_url clone (cfg is now an Arc read directly in the banner). AdminFeedbackDetail is retained: it became live after the issue snapshot (feedback detail view) and removing it would break the build.

#BUNYIP-78
Merge branch 'main' into fix/bunyip-78
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / fmt / clippy / build / test (pull_request) Successful in 1m2s
fdaa02425b
David merged commit e4c835f864 into main 2026-06-13 13:15:48 +02:00
David deleted branch fix/bunyip-78 2026-06-13 13:15:48 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psa-systems/bunyip!133
No description provided.