Commit Graph

571 Commits

Author SHA1 Message Date
Alexander Zaytsev 6d6f94ce13 Merge branch 'main' into delete-account-improvements 2026-03-19 15:26:31 +01:00
Mike Dalessio 11df9c3589 Fix back navigation from activity page to cards (#2727)
Three changes needed to support navigating back from a card to the
activity page:

- Add root_path to the prefer_referrer allowlist on the card show page
- Switch event links from HTML target="_top" to data-turbo-frame="_top"
  so Turbo handles the navigation and turbo:before-visit fires to save
  the referrer
- Normalize trailing slashes in the referrer path comparison so
  /account_id and /account_id/ both match

ref: https://app.fizzy.do/5986089/cards/2390
2026-03-18 22:03:36 -04:00
Mike Dalessio 248fc5d3e7 Fix back navigation from filter views to cards (#2725)
* test: update sign_in_as system test helper to be more generic

and support fixture users with more than one board

* test: backfill a test for the card "back link"

when coming from a board filter page

* Fix back navigation to filter views from cards

When navigating from a filter view to a card, the back link now shows
the filter's label and navigates back to the filter URL instead of the
card's board.

The turbo-navigation Stimulus controller stores the page title alongside
the referrer URL in sessionStorage. On the card show page, a
referrerBackLink target rewrites the back link's href and label from the
stored values. This is scoped only to the card show page to avoid
navigation loops in multi-level deep pages.

* Add referrer allowlist to prevent stale referrer rewrites

The back link is only rewritten when the stored referrer's path matches
an allowlist of paths passed via prefer_referrer. This prevents stale
referrers from unrelated pages (e.g., settings) from overriding the
card's back link.

* Move back link navigation tests to dedicated system test file

Extract back link tests from smoke_test.rb into their own file since
they test specific JavaScript behavior that needs regression coverage.
Move sign_in_as helper to ApplicationSystemTestCase for reuse.

* Move markdown paste tests to dedicated system test file
2026-03-18 17:03:13 -04:00
Adrien Maston 780607dddc Merge branch 'main' into mobile/bridge-done-stamp
* main: (43 commits)
  Remove payment/subscription system and card/storage limits
  Conditionally disable peer verification for ZIP streaming
  Prevent HTML injection through filenames
  Revert "Configure Lexxy to add extra spacing between block elements"
  Configure Lexxy to add extra spacing between block elements
  SaaS usage reporting (#2690)
  Update app/models/user/named.rb
  Prevent line breaks in the middle of familiar_name
  Tweak the layout
  Set the list of importable models based on the record sets in the manifest
  Validate polymorphic types against importable models allowlist
  Fix that the "maybe" stream wouldn't be replaced after triaging a card
  Use x_user_agent cookie for platform detection in Hotwire Native
  Add JSON response format to entropy endpoints (#2673)
  Fix path traversal vulnerability in ActiveStorage blob key import
  Enable CORS fetch mode for storage requests
  Revert CORS fetch mode for Active Storage
  Use CORS fetch mode for Active Storage to enable `maxEntrySize` checks
  Only start offline mode when signed in
  Exclude service worker and edit/pin/watch/new pages from main cache
  ...
2026-03-17 15:27:29 +01:00
Jay Ohms 5c1f3a1f4f Refactor stamp component and observe element changes so subsequent "connect" messages will be sent 2026-03-17 08:12:57 -04:00
Adrien Maston 2d1e201946 Add scope selector value 2026-03-17 11:57:59 +01:00
Adrien Maston 0b29a67e17 Change date and closedBy properties for a more generic description 2026-03-17 11:09:37 +01:00
Stanko K.R. 8f6fca94fa Prevent HTML injection through filenames 2026-03-16 17:50:31 +01:00
Alexander Zaytsev c977d03692 Use fire() instead of dispatch()
Addresses Copilot's feedback
2026-03-10 11:45:37 +01:00
Rosa Gutierrez 0482670fec Exclude service worker and edit/pin/watch/new pages from main cache
We don't need the service worker to cache itself, or pages that won't
work offline anyway.
2026-03-10 10:20:54 +01:00
Rosa Gutierrez de6d70cc2e Bump turbo-rails for Turbo.offline.clearCache()
Simplify the clear-offline-cache controller to use the new
Turbo.offline.clearCache() API instead of messaging the service
worker directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 10:20:54 +01:00
Rosa Gutierrez 1c2de6ca79 Clear offline cache on sign-in as well as sign-out
Rename logout controller to clear-offline-cache and attach it to the
magic link verification form so the service worker cache is cleared
when a different user signs in.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 10:20:54 +01:00
Rosa Gutierrez a949f1e3ae Clear offline cache when logging out
Adds a logout Stimulus controller that sends a message to the service
worker to clear all cached content when the user logs out. This ensures
that cached data from one user isn't accessible after logout.

The implementation:
- Adds logout_controller.js that posts { action: "clearCache" } to the
  service worker via postMessage
- Updates logout buttons to use the controller on form submission

Also fixes data-turbo placement: moved from button to form element where
it actually takes effect for disabling Turbo Drive form submissions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-10 10:20:54 +01:00
Alexander Zaytsev 0555523747 Merge branch 'main' into delete-account-improvements 2026-03-09 15:48:21 +01:00
Adrien Maston d746b86e70 Remove debug line 2026-03-09 15:43:58 +01:00
Adrien Maston 078597f132 Add bridge component 2026-03-09 15:40:45 +01:00
Alexander Zaytsev eac750912f Reset checkbox when cancellation dialog closes 2026-03-09 09:55:23 +01:00
Alexander Zaytsev 04bf063e3c Make the Delete account dialog more careful 2026-03-06 18:01:23 +01:00
Adrien Maston 920502b590 Scroll column into view when opening its menu 2026-03-04 11:31:45 +01:00
Adrien Maston 9c26e834b7 Don't try to orient column menus 2026-03-04 11:30:42 +01:00
Adrien Maston 8fced550d8 Refactor 2026-03-03 10:31:08 +01:00
Adrien Maston 340d9aa763 Delegate clearing the input to new controller 2026-03-02 14:21:32 +01:00
Jay Ohms 867267890b Update app/javascript/controllers/bridge/buttons_controller.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-26 08:05:48 -05:00
Jay Ohms 7427675fc8 PR feedback 2026-02-26 07:53:02 -05:00
Jay Ohms 84c650ab25 Fix beforeunload event listeners 2026-02-26 07:41:51 -05:00
Jay Ohms 339a37576c Try adding turbo:before-visit event listener to test refreshing on iOS 2026-02-26 05:04:14 -05:00
Jay Ohms 6ceb5ef7c3 Notify the form/buttons components of a disconnect before a page reload. This gives the native components an opportunity to reset their state before the fresh page loads. 2026-02-25 15:32:00 -05:00
Adrien Maston a4f1a6b106 Coding style 2026-02-23 16:11:52 +01:00
Adrien Maston 0b229c701b Rename event 2026-02-23 16:10:54 +01:00
Adrien Maston 1d07e10650 Replace additional date by optional description 2026-02-20 17:18:53 +01:00
Adrien Maston 4e53000bc3 Add bridged share button to board and card permas 2026-02-20 13:03:33 +01:00
Rosa Gutierrez bb6f2963b4 Revert commits accidentally pushed to main
Revert "Add bridged share button to board and card permas"
This reverts commit 069e165b43.

Revert "Move helper to bridge helper file"
This reverts commit 1ee37f046c.
2026-02-20 12:58:39 +01:00
Adrien Maston 069e165b43 Add bridged share button to board and card permas 2026-02-20 12:49:00 +01:00
Stanko K.R. 36ee253a1a Stack notifications everywhere
We had client-side notification stacking in the tray since launch, but now we want to stack notifications in the notifications page, in API responses and in email bundles.
2026-02-12 10:29:50 +01:00
Adrien Maston a8676ada4c Merge pull request #2490 from basecamp/fix-hidden-filters-in-firefox
Fix hidden filters in Firefox
2026-02-06 11:01:54 +01:00
Adrien Maston 186d759672 Instant scrolling on restore, animated on user action 2026-02-05 17:17:49 +01:00
Adrien Maston 9d4655d35e Make filters "open" by default then hide in mobile apps 2026-02-05 11:12:50 +01:00
Adrien Maston 171b8caa45 Switch non-animated scrolling in the mobile apps 2026-02-04 18:35:12 +01:00
Adrien Maston aa3103de3c Rename handleDesktop method 2026-02-03 12:52:54 +01:00
Adrien Maston 43d12b27ed Expand maybe column is no expanded column is found in localStorage
... to trigger scrolling into view
2026-02-03 12:12:20 +01:00
Andy Smith ba260db8a2 Nicer file input 2026-02-02 12:36:48 +01:00
Mike Dalessio 017e1434f1 Reapply "Fix lightbox blocking clicks on page elements"
This reverts commit c70c4b4107.
2026-01-28 17:53:53 -05:00
Mike Dalessio c70c4b4107 Revert "Fix lightbox blocking clicks on page elements"
This reverts commit 17b7af9b92.
2026-01-28 17:53:21 -05:00
Mike Dalessio 17b7af9b92 Fix lightbox blocking clicks on page elements
The CSS change in 39575a0 added `display: flex` to the lightbox dialog
unconditionally, which overrode the browser's default `display: none`
for closed dialogs. This made the invisible lightbox overlay intercept
all clicks on the page.

Move flexbox properties to the `&[open]` selector so they only apply
when the dialog is actually open.

Also fix typo: `innerHtml` → `innerHTML` (capital H).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:51:32 -05:00
Adrien Maston fefb28848b Merge branch 'main' into mobile/prepare-webviews-2
* main: (26 commits)
  Add a new Pins section to docs/API.md covering pin/unpin and the pinned cards list response.
  Align board name start so it doesn't get too big
  Clean up card/events header layout
  Sync email to Stripe when user changes email address (#2432)
  Fix IDOR in webhook activation endpoint (#2431)
  Add card reactions to API docs and reactions_url to card JSON (#2427)
  Remove unnecessary claude plan
  Allow boosts on cards (#2411)
  Revert "Fix notification click URL by using correct data property"
  Add migration to remove draft cards from search index
  Guard search indexing with searchable? check
  Forbid comments on draft cards
  prefactor: update search to use published cards
  Fix notification click URL by using correct data property
  Wait for service worker to be active before subscribing
  Fix stuck state when permission granted but no subscription
  Extract Card::Commentable
  Include arm64 build in Docker workflow
  Remove unnecessary `await` in push handler
  Correctly initialise WebPush connection (#2417)
  ...
2026-01-27 17:17:21 +01:00
Adrien Maston 39575a0cb6 Fix lightbox layout and focus 2026-01-23 17:41:33 +01:00
Rosa Gutierrez 26d5701217 Wait for service worker to be active before subscribing
The push subscription requires an active service worker. When
registering a new service worker, we now wait for it to become
active using navigator.serviceWorker.ready before attempting
to subscribe to push notifications.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:38:45 +01:00
Rosa Gutierrez c650cba179 Fix stuck state when permission granted but no subscription
When you had already granted notification permission but hadn't
completed the subscription flow (no service worker or no push
subscription), the UI showed neither the subscribe button nor the
enabled state, leaving you stuck with no way to subscribe, and wrong
instructions to fix it.

Instead, let's just show the button to allow you to subscribe.
2026-01-23 16:38:45 +01:00
Adrien Maston 764eb8987a Tweak orientation helper to prevent popups from going off screen 2026-01-23 14:06:17 +01:00
Adrien Maston ff9e617f34 Merge branch 'main' into mobile/prepare-webviews-2
* main:
  Return to Board page when clearing filters
  Bump card perma z-index when dialog is open
  Only submit on blur if the input has a value
  Make the CLAUDE.md stub less obtrusive
  Only index up to 32KB of search content
  Use inline spacing variable
  Actually make it affect larger screens too
  Use CSS variable for panel size in delete dialogs
  Add viewport padding to dialogs on mobile
  Prevent page scrolling when modal dialog is open
2026-01-22 11:01:38 +01:00