228 Commits

Author SHA1 Message Date
Jeremy Daer 723c8180b4 Add JSON response format for full SDK/CLI coverage (#2675)
* Add JSON response format to void-response controller actions

Add respond_to blocks with JSON format to 14 controllers that
previously only rendered HTML or Turbo Stream responses. JSON
callers get head :no_content (or :created/:ok for push
subscriptions, distinguishing new vs existing).

Covers: board involvements, board/account entropies, column
reordering, card readings, card publishing, user roles, user
avatars, account settings, notification settings, join codes
(with 422 error branch), and push subscriptions.

* Add steps index endpoint with JSON view

Add index action to Cards::StepsController so SDK/CLI callers
can list all steps for a card. Reuses the existing _step.json
partial.

* Add JSON views for paginated card list endpoints

Add show.json.jbuilder for stream, not-now, and closed column
endpoints. No controller changes needed — set_page_and_extract_
portion_from and fresh_when already work format-agnostically.

* Add JSON search endpoint with distinct-card pagination

JSON search paginates distinct Card records (via the existing
Card.mentioning scope with .distinct) rather than Search::Record
objects. This ensures page boundaries, Link headers, and counts
reflect unique cards — no short pages from post-pagination dedup.

ID-match searches return a uniform single-element Card[] array
through the same pagination path.

* Add JSON views for settings and configuration endpoints

Add show.json.jbuilder for account settings (name), join codes
(code, usage_count, usage_limit, url, active), and notification
settings (bundle_email_frequency). Tests for show and update
were added in the void-response commit.

* Add JSON response format to data exports

Create returns 201 with export id, status, and created_at so
callers can poll. Show returns any-status exports for JSON (not
just completed) with a download_url when ready, or 404 for
missing/other-user exports.

* Extend access token JSON API

Add index.json and _access_token.json partial for listing tokens.
Add JSON format to destroy. Include id and created_at in the
create response alongside the existing token/description/permission
fields.

* Fix ambiguous precedence warning in export JSON view

* Assert X-Total-Count pagination header in streams JSON test

* Address review feedback

- Guard steps index against HTML requests (redirect to card)
- Normalize created_at to UTC in access token and export JSON
- Add deterministic ordering (.latest) to search JSON pagination

* Return 406 for HTML requests to steps index instead of redirect

* Add wrap_parameters for flat SDK JSON payload compatibility

Five controllers infer the wrong wrapper key from their class
name, so flat JSON bodies like {"role":"admin"} fail with 400.
Add explicit wrap_parameters declarations:

- Users::RolesController → :user
- Notifications::SettingsController → :user_settings
- Account::JoinCodesController → :account_join_code
- Account::SettingsController → :account
- Boards::EntropiesController → :board

Add integration tests that send flat (unwrapped) JSON payloads
for all seven param-bearing endpoints to prove SDK compatibility.

* Address PR review feedback

- Use 201 Created (not 204) for all create actions: publishes, readings,
  left/right positions, push subscriptions
- Simplify push subscription to always return :created (no 200/201 variance)
- Remove superfluous respond_to block from steps#index
- Merge exports#show into single respond_to block
- Move export download_url conditional out of inline args
- Ensure join code active is explicitly boolean
- Remove extra parens from search controller assignment
- Add blank lines between format blocks for readability

* Return JSON bodies on create actions

Create actions for boards, cards, columns, comments, and steps now
render the resource as JSON (via their show views) instead of returning
empty 201 responses with only a Location header. SDKs expect a JSON
body they can deserialize into the created resource.

* Return JSON bodies on reaction create actions

Card and comment reaction creates now render the reaction as JSON
instead of returning empty 201 responses, consistent with the other
resource-creating endpoints.

* Allow access tokens API without account scope

Access tokens are identity-level (not account-scoped), so the
controller needs to work with bearer token auth and no account slug
in the URL. Skip require_account so the bearer token auth path
can proceed.

Also fix involvement test to send params in JSON body (not query
string) to match real SDK usage.
2026-03-09 11:39:49 -07:00
Fernando Olivares 3c54cd84fc Add native push notification infrastructure
- Add action_push_native gem and SaaS configuration
- Add device registration API and UI
- Add User::Devices concern
- Add NotificationPusher::Native for push delivery
- Add tests and fixtures for native push
2026-02-25 19:31:13 +01:00
Andy Smith 17d869cf08 Cleanup unused classes 2026-02-20 11:09:15 -06:00
Andy Smith f835c211af Make generic scrollable list class for settings 2026-02-20 11:05:26 -06:00
Alp Keser 610cf7a190 Merge pull request #2398 from basecamp/notifications-tray-api
Add JSON response support for `notifications/tray`
2026-02-18 13:19:59 +03:00
Alexander Zaytsev 6f839c5b2f Remove periods after ellipses 2026-02-13 18:21:47 +01:00
Alexander Zaytsev da5e67a0a6 Use h3 instead of h2 2026-02-13 18:19:38 +01:00
Jirka Hutárek c4c46cce44 Add postponed and closed flags to Pinned and Notification cards 2026-02-13 00:45:47 +01:00
Alp Keser b755522a73 Add notification.source_type.underscore 2026-02-12 14:55:34 +03:00
Fernando Olivares a844353f1e Remove unused has_attachments and assignees from notification JSON
These fields were added but are not used by the iOS client.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 14:55:34 +03:00
Fernando Olivares 6809804d3a Add card assignees to notification JSON
Includes assignee users in the card object for display in notification UI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 14:55:34 +03:00
Fernando Olivares 009e431ad8 Add has_attachments to notification card JSON
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 14:55:34 +03:00
Denis Švara 683547e310 Use the existing user partial on notifications. 2026-02-12 14:55:34 +03:00
Denis Švara 3dca00a9ab Extend notification JSON payload.
Add avatar url, board name, and column.
2026-02-12 14:55:34 +03:00
Denis Švara 0b9869f3c9 Add JSON response support for notifications/tray. 2026-02-12 14:55:34 +03: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 2ab9dd8a30 Remove no-longer wanted margin
... after getting the newer stuff from main
2026-02-03 11:25:35 +01:00
Adrien Maston a6a20fa56e Merge branch 'main' into mobile/hide-sections-from-apps
* main: (65 commits)
  Fix crash due to missing ActiveStorage URL options
  Capture backtrace of nested errors
  Remove debug code
  Add more debug info
  Pass all service options
  Prevent duplicate files in user data export
  Write in binmode
  Replace custom IO object with a transport manager IO
  Explain imports & exports
  Add missing method to IO object
  Rename jobs
  Finishing touches
  Delete accounts for failed imports
  Check that associations don't exist
  Bust the cache after import
  Explicitly use the default storage service
  Fix ActiveStorage writing to disk
  Fix crash on successful import email
  Fix orphaned attachments when deleting the whole account
  Add size to remote io
  ...
2026-02-03 10:49:16 +01:00
Adrien Maston 270eacf43a Hide push notifications settings 2026-02-02 17:37:47 +01:00
Andy Smith 4f2cb01143 Polish up notification settings to match 2026-02-02 12:36:48 +01:00
Adrien Maston 161925ab2b Merge branch 'main' into mobile/prepare-webviews-2
* main: (100 commits)
  Fix notification broadcast test for turbo-rails 2.0.21
  Update `turbo-rails` to get latest Turbo version
  Remove reference to removed controller
  Fix bad formatting on bridge page title attr
  Use private functions for bridge components
  Setup focus handling on touch target's connect callback
  Setup proper focus handling for mobile on the card perma's board picker
  Move dialog focus handling into the dialog controller
  Create popup initial alignment classes
  Fix class typo
  Hide the board selector button if card is closed
  Align board and tag picker dialogs without using math
  Add dialog manager to card perma
  Fix "M" hotkey using stale user from fragment cache
  Solve problem when Action Text raises on missing attachables
  Solve problem when Action Text raises on missing attachables
  Completing a step removes stalled status from UI
  Bump Bootsnap to v1.21.1
  Add Enable all/Disable all buttons to webhook event selection
  Use correct class selectors to target cards with  background images
  ...
2026-01-20 13:38:38 +01:00
Adrien Maston d9759ef67f Merge branch 'main' into mobile/prepare-webviews-2
* main: (34 commits)
  Disable card column buttons when active
  Prevent comment content from overlapping with reaction button
  Delete pins belonging to cards in a board with revoked access
  Update development dependencies in SAAS lockfile
  Update runtime dependencies
  Update development dependencies
  Balance magic link instructions
  Add `.txt-balance` utility
  Move handleDesktop inside restoreColumnsDisablingTransitions
  Adjust border radius
  Clean up blank slates
  Add dialog manager to events page
  More sturated mini bubbles in light mode
  Brighten mini bubbles in dark mode
  Use separate cache namespaces for each beta instance
  Bump boost size up a tick on mobile
  Move Undo form inside closure message element
  Phrasing tweak for exceeding storage limit
  Keep strong tags words on same line
  Allow ActionText embed reuse and safe purge (#2346)
  ...
2026-01-14 10:36:04 +01:00
Adrien Maston 3b97b2e5c8 Merge branch 'main' into mobile/bridge-components
* main: (22 commits)
  Disable card column buttons when active
  Prevent comment content from overlapping with reaction button
  Delete pins belonging to cards in a board with revoked access
  Update development dependencies in SAAS lockfile
  Update runtime dependencies
  Update development dependencies
  Balance magic link instructions
  Add `.txt-balance` utility
  Move handleDesktop inside restoreColumnsDisablingTransitions
  Adjust border radius
  Clean up blank slates
  Add dialog manager to events page
  More sturated mini bubbles in light mode
  Brighten mini bubbles in dark mode
  Use separate cache namespaces for each beta instance
  Bump boost size up a tick on mobile
  Move Undo form inside closure message element
  Phrasing tweak for exceeding storage limit
  Keep strong tags words on same line
  Allow ActionText embed reuse and safe purge (#2346)
  ...
2026-01-14 10:34:13 +01:00
Denis Švara 4f7cec3b71 Rename bride page controller to title controller and remove text size related code. 2026-01-13 09:36:24 +01:00
Andy Smith 64fdbf6b8f Clean up blank slates 2026-01-12 15:37:06 -06:00
Adrien Maston 8bf2397c4a Don't make all buttons bigger on mobile 2026-01-09 11:57:16 +01:00
Jay Ohms b9dcc3c08f Update bridged overflow menu items for settings links 2026-01-08 16:36:12 -05:00
Denis Švara eae17b82b4 Merge branch 'main' into mobile/bridge-components
* main: (65 commits)
  Repair scope for card styles within the columns view
  Add missing list to cards page
  Account for simpler public views
  Fix public layout
  Pull board-tools outside of the list for mobile
  saas: move log_level setting into an environment variable
  Restore log level configurability in production environment
  Remove engagements
  Use notch class so Save button is positioned correctly
  Go back to board after clearing filters
  Revert "Use existing no_filtering_url to direct back to the board when clearing filters"
  Use existing no_filtering_url to direct back to the board when clearing filters
  Ensure filters sit on top of cards
  Fix public boards
  Fix card grid layout
  Fix Chinese/Japanese characters missing from printed PDFs on macOS
  Add SQLite FTS5 support for CJK search
  Add CJK (Chinese, Japanese, Korean) search support
  Fix scrolling on mobile
  Remember expanded state on navigation
  ...
2026-01-08 14:34:10 +01:00
Denis Švara ecf0921af9 Add bridge page targets. 2026-01-06 16:03:28 +01:00
Alexander Zaytsev 43d56b39ea Show full browser name for Chrome in instructions 2025-12-24 16:13:48 +01:00
Alexander Zaytsev 2d5e441bf5 Consistent spacing 2025-12-24 15:51:46 +01:00
Alexander Zaytsev e7d8f87d3c Add missing comma 2025-12-23 22:53:36 +01:00
Alexander Zaytsev 77279d470f Notifications settings -> Notification Settings 2025-12-23 22:53:16 +01:00
Kevin McConnell e2292a1739 Update cached fragments 2025-12-15 13:23:57 +00:00
Alexander Zaytsev afc59cd7c9 Hide Previously Seen section when empty 2025-12-10 20:25:58 +01:00
Alexander Zaytsev d926617e58 Reuse blank slate styles 2025-12-10 20:24:36 +01:00
Stanko K.R. 3257e4a6e9 Inline partials 2025-12-10 15:27:56 +01:00
Stanko K.R. bf51950007 Add API for reading notifications 2025-12-10 09:23:52 +01:00
vkagithala 8685b62232 Added 'Back to Home' link on notifications list page to improve navigation experience. 2025-12-03 17:21:50 -08:00
Jason Zimdars c0920f046f Move to bottom, use utility classes 2025-11-21 09:29:21 -06:00
Jorge Manrubia 42a39b224c Cap the max number of unread notifications to 500
Simpler than adding 2 levels of pagination here
2025-11-21 15:55:24 +01:00
Jorge Manrubia a5b58e47fe Remove unclosed span 2025-11-20 21:32:43 +01:00
Jorge Manrubia 6269f3c47e Reload notifications tray when the window regain the focus
https://app.fizzy.do/5986089/cards/2743

It includes a debounce interval to avoid too many of these.
2025-11-18 08:49:19 +01:00
Mike Dalessio 2cb050af33 Missed a few changes in a rebase somewhere
This changeset now matches plan-b commit 609a0041
2025-11-17 09:19:46 -05:00
Jorge Manrubia eea9afb639 Fix: dismiss grouped notifications by card from the notifications tray
This also splits the templates into two: index and tray, since the URL now changes.
2025-11-14 12:58:24 +01:00
Jorge Manrubia 37e6b2461e Headers are indentical 2025-11-14 12:27:13 +01:00
Jorge Manrubia 3b60e68ceb Merge branch 'main' into unique-notifications 2025-11-13 09:38:01 +01:00
Jason Zimdars c0247671f7 Fix regression that made index full-width 2025-11-12 12:09:01 -06:00
Andy Smith 44b0f5f5bc Make the dialog sizing property optional 2025-11-12 11:44:31 -06:00
Jason Zimdars 3625585a9d Adjust unread indicator to include unread count 2025-11-12 11:15:25 -06:00