Skip to content

fix(ui): keep update notice actions on one line and show local update times - #370

Merged
shingonoide merged 2 commits into
mainfrom
update-notice-ux
Nov 19, 2026
Merged

shingonoide merged 2 commits into
mainfrom
update-notice-ux

Conversation

@shingonoide

Copy link
Copy Markdown
Contributor

Summary

  • The available-update notice no longer puts the blocked-install reason in its action row. It states that in-app install is unavailable and points to Settings > Updates. "Skip this version", "Later" and "Download and install" stay on one line.
  • The installed version has its own line. Release dates and "Last checked" use the browser's locale, and the exact RFC 3339 value is in a title tooltip. Values that do not parse are shown as sent.
  • Adds the update_notice desktop acceptance journey. It drives a loopback release feed through Settings > Updates > Check for updates and checks the notice at 1280 px and at the 900 px minimum window width.
  • The acceptance build now enables updater-test-endpoints, so the journey can point the updater at that feed. Production builds are unaffected.

Related issue

  • None.

Testing

  • cargo clippy -p slashit-ui -p slashit -p slashit-ipc -p slashit-attention -p slashit-activity -p slashit-review-content -- -D warnings
  • cargo test -p slashit-ui -p slashit-ipc -p slashit-attention -p slashit-activity -p slashit-review-content (3194 passed, 18 ignored, 0 failed)
  • cargo test -p slashit-frontend (402 and 3 passed)
  • cargo clippy -p slashit-acceptance --all-targets --features run-acceptance -- -D warnings
  • scripts/check-acceptance-shards.sh (76 journeys covered)
  • scripts/build-acceptance-app.sh then scripts/run-desktop-acceptance.sh --exact update_notice::update_notice_fits_both_widths_and_settings_keeps_the_detail (passed, 6 s)
  • cargo fmt --check fails on main as well, in files this PR does not touch (acceptance crate, product_acceptance.rs, settings.rs import order, and other frontend files). The hunks in update_banner.rs and the new journey were formatted by hand or with rustfmt.
  • trunk build (run as part of the acceptance app build)

Notes

  • Rendered verification: the journey checks the notice fits its viewport, that each button is one line (height at most 40 px, white-space: nowrap) and inside the notice, that the release line is localized with the raw value as its tooltip, and that Settings shows the release notes as Markdown with the Updates tab selected. It then checks that Later hides the notice and the Settings offer for the session. Screenshots are local artifacts and are not uploaded.
  • The narrow case is 900 px because the main window's minWidth is 900 (src-tauri/src/main_window.rs). A 480 px target was clamped to 900.
  • A malformed release date cannot reach the banner end-to-end: the updater rejects a non-RFC 3339 pub_date before the frontend sees it. The malformed-input path is covered by the timestamp_label unit test only.
  • Known, not changed: at 900 px the Settings "Current version" card is squeezed. "Last checked" wraps one word per line and the Check button overlaps the label, and the page scrolls horizontally. This is a width-split problem in Settings, not in this change.
  • Later hides the offer from Settings as well as from the notice for the session. That is existing behavior, and this PR does not change it.

… times

The available-update notice no longer puts the blocked-install reason in the
action row: it names the state in one line and points to Settings > Updates,
and the action buttons stay on one line. Release and last-checked times are
shown in the browser's locale, with the exact RFC 3339 value in a tooltip.

Adds an acceptance journey that drives a loopback release feed through the
Settings check and checks the notice at the 1280 px default and the 900 px
minimum window width. The acceptance build now enables
updater-test-endpoints so the journey can point the updater at that feed.
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: BarraDev/slashit
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: cbee93a
  • Layers: Repository YAML (base), Repository UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 388be3c2-9ccb-4d36-b9de-7691759bbc2c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
Walkthrough

The update notice now displays the installed version and localized release date. When in-app installation is unavailable, it directs users to Settings > Updates and does not show an install button. The Updates settings also display localized timestamps with the exact values in tooltips. A new acceptance journey uses a local release feed to check notice layout and content, Settings release notes, and dismissal behavior at two window sizes.

Change: Bug fix

Merge Risk: Low · previous review 3bca9

This change keeps the update notice actions on one line and shows local times in the update notice and the Updates settings. The only remaining concerns are in the new acceptance test: it could miss stacked buttons, and it could fail intermittently when the startup update check overlaps. Neither affects the shipped behavior, so the change can merge after those test fixes or with them explicitly accepted.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title names the two main user-visible changes: the update notice actions staying on one line, and update times shown in local time. The changeset matches both, including the notice rework in updat…
Description check Passed The description covers the notice rework, the locale-aware timestamps with RFC 3339 tooltips, the new update_notice acceptance journey, and the updater-test-endpoints build change. It also lists test …
Persistent State Integrity Passed The check applies only to changed code that mutates persisted application state. The PR changes six files: a shard manifest, the acceptance test registration, a new acceptance journey (`update_notice.…
Recoverable Resource Lifecycle Passed The check "Recoverable resource lifecycle" applies only to changes in worktree, task, migration, or cleanup lifecycle code. This PR (6 files) does not change any such code. Changed files and what they…
Platform Boundary Safety Passed The changed code does not add Unix-only or Windows-only APIs, and the changed build path does not create a cross-platform compile failure. - New acceptance journey (`crates/slashit-acceptance/test…
Full details: Title check

Explanation

The title names the two main user-visible changes: the update notice actions staying on one line, and update times shown in local time. The changeset matches both, including the notice rework in update_banner.rs and the locale formatting in settings.rs. The title does not mention the acceptance test or the build feature flag, but those are supporting changes.

Full details: Description check

Explanation

The description covers the notice rework, the locale-aware timestamps with RFC 3339 tooltips, the new update_notice acceptance journey, and the updater-test-endpoints build change. It also lists test results and known limitations, all matching the changeset.

Full details: Persistent State Integrity

Explanation

The check applies only to changed code that mutates persisted application state. The PR changes six files: a shard manifest, the acceptance test registration, a new acceptance journey (update_notice.rs), the acceptance build script, src/components/update_banner.rs, and src/pages/settings.rs. Changed production code is display-only. timestamp_label formats RFC 3339 values for display and returns the raw string for a tooltip. The notice now shows the installed version, an install-unavailable message, and a conditional install button. The Skip and Later handlers still call the existing set_skipped_version and dismissed_version.set, and the diff does not modify them. A keyword scan of added lines found only: test-harness code that sets localStorage['slashit_current_page'] through an eval, screenshot file writes gated by an environment variable, and loopback socket writes in the test fixture. These are test-only paths and do not mutate app persisted state in the changed production code. No changed code reports success after a persistence failure, publishes unpersisted state, or performs a stale read-modify-write. The build change only adds the updater-test-endpoints feature to the acceptance build.

Full details: Recoverable Resource Lifecycle

Explanation

The check "Recoverable resource lifecycle" applies only to changes in worktree, task, migration, or cleanup lifecycle code. This PR (6 files) does not change any such code. Changed files and what they do: - src/components/update_banner.rs: UI text, timestamp formatting (timestamp_label), and the install-unavailable message. No persisted state or cleanup. - src/pages/settings.rs: imports timestamp_label and changes the display of "Last checked" and "Released" dates, adding title tooltips. No lifecycle logic. - crates/slashit-acceptance/tests/product_acceptance.rs: adds only #[path] and mod update_notice; (+2 lines). The worktree and cleanup journeys in this file already exist and are unchanged. - crates/slashit-acceptance/tests/product_acceptance/update_notice.rs: new UI acceptance test for the update notice. It starts a loopback fixture and does not delete or clear resources. - crates/slashit-acceptance/shard-manifest.txt: adds one test entry. - scripts/build-acceptance-app.sh: adds --features updater-test-endpoints to the acceptance build. Grep hits for "worktree", "cleanup", and "delete" matched only unchanged lines in existing acceptance journeys. The PR does not alter them. No code in this range can clear a persisted task, worktree, or migration reference, or remove a cleanup retry path. The check does not apply.

Full details: Platform Boundary Safety

Explanation

The changed code does not add Unix-only or Windows-only APIs, and the changed build path does not create a cross-platform compile failure. - New acceptance journey (crates/slashit-acceptance/tests/product_acceptance/update_notice.rs): it uses only cross-platform APIs (tokio::net on 127.0.0.1, std::env::var_os, PathBuf). The module is included from tests/product_acceptance.rs, which already has #![cfg(target_os = "linux")] at line 25, so it does not compile on other targets. The std::os::unix uses in the crate are pre-existing and sit behind cfg gates. - Feature change (scripts/build-acceptance-app.sh): it adds --features updater-test-endpoints to an existing command. The feature is declared in src-tauri/Cargo.toml as updater-test-endpoints = [] with no platform dependencies. Its code in src-tauri/src/update_feed.rs is gated with #[cfg(feature = "updater-test-endpoints")] and #[cfg(not(...))] pairs. The script is a Bash script, but that Unix dependency already existed. - Frontend changes (src/components/update_banner.rs, src/pages/settings.rs): the new timestamp_label uses chrono and js_sys. Both are unconditional dependencies in the root Cargo.toml, and js_sys is already used elsewhere in src/. The diff adds no cfg gates and no platform-specific calls. The only PathBuf hit is in the acceptance test's screenshot helper, which is cross-platform. No failure condition in the custom check is met.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

Review info

Run configuration

  • Source mode: Auto
  • Repository: BarraDev/slashit
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: cbee93a
  • Layers: Repository YAML (base), Repository UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 054ada15-fb81-492f-9da9-e8badfe27f89
Commits

Reviewing files that changed from the base of the PR and between cbee93a and 3bca998.

Files selected for processing: 6

  • crates/slashit-acceptance/shard-manifest.txt
  • crates/slashit-acceptance/tests/product_acceptance.rs
  • crates/slashit-acceptance/tests/product_acceptance/update_notice.rs
  • scripts/build-acceptance-app.sh
  • src/components/update_banner.rs
  • src/pages/settings.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

The update notice journey checked each action button's height, wrapping and
containment, but not its vertical position, so two stacked buttons could pass.
It now compares the button tops at both widths, and a unit test shows the rule
refuses stacked buttons and accepts one row.

The Check for updates press now looks up and clicks the button on every retry,
and never clicks a disabled button. The journey holds the release listing for
1.5 seconds, observes the Checking... state, then presses again once the check
finishes.

Correct the updater-test-endpoints comment: the acceptance build is a debug
build and needs no test key or --config file.
@shingonoide
shingonoide merged commit 4e8ef5f into main Nov 19, 2026
17 checks passed
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.

1 participant