732 Commits

Author SHA1 Message Date
Mike Dalessio 151787a864 Remove dead Tag::Attachable code and tags prompt
The tags prompt was added for the Fizzy Do command system, but became
dead code when commands were removed in 89af9066. The commands_prompt
was cleaned up but tags_prompt was missed.

Remove the Tag::Attachable concern, Prompts::TagsController, its views
and route, and the tags_prompt helper. Tag still includes
ActionText::Attachable directly, which is needed by the data transfer
system.
2026-04-09 17:13:41 -04:00
Zacharias Knudsen 6808250c8f Merge pull request #2745 from basecamp/excert-truncation
Pre-truncate excerpt before running replacement regexes
2026-03-23 10:24:58 +01:00
Zacharias Dyna Knudsen 6c771584d7 Pre-truncate excerpt before running replacement regexes
Also fixes <ol> normalization which was previously a noop.
2026-03-23 10:21:35 +01:00
Mike Dalessio 95a45aa651 Don't memoize AutoLinkScrubber across format_html calls
The scrubber was memoized on the view helper in b0fa6525 so that
@regexp_timeout_reported would stop scanning remaining text nodes
after a timeout. But memoizing on the helper leaks that flag across
all format_html calls for the entire request — if one comment triggers
a timeout, every subsequent comment on the page loses auto-linking.

Use a fresh scrubber per call. The @regexp_timeout_reported flag still
works within a single document's scrub, which is the intended scope.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 16:03:47 -04:00
Zacharias Dyna Knudsen b0fa6525fe Stop scrubbing after first regexp timeout 2026-03-20 12:13:17 +01: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
Rob Zolkos 23ac76555b Validate and normalize auto-postpone period to days (#2672)
* Validate and normalize auto-postpone period to days

- Add Entropy::AUTO_POSTPONE_PERIODS and validate auto_postpone_period against the allowed set
- Introduce auto_postpone_period_in_days for forms and entropy update endpoints
- Fall back to index 0 in knob partial when current value isn't in options
- Remove entropy_auto_close_options helper in favor of model constant
- Update tests to use allowed period values

* Use auto_postpone_period_in_days for JSON entropy updates

The JSON API was accepting auto_postpone_period (seconds) which
bypassed the days normalization and validation. Switch to
auto_postpone_period_in_days consistently and add explicit
wrap_parameters so flat JSON params are wrapped correctly for
the virtual attribute.

* Default to account or 30-day fallback when knob value is invalid

* Address PR review feedback for entropy validation

- Fall back to first knob option (index 0) when persisted value isn't in
  the allowed set, preventing nil index errors for legacy values
- Use integer division (1.day.to_i) for consistent day calculations

* Default to account entropy period instead of first option for knob fallback

* Test that default auto-postpone period is in the allowed periods

* Return 422 instead of 500 for invalid entropy auto-postpone values

Rescue ActiveRecord::RecordInvalid in entropy controllers so invalid
auto_postpone_period_in_days values return 422 Unprocessable Entity
instead of raising a 500.

* Fix NoMethodError when board entropy falls back to account default

Use container.account.entropy.auto_postpone_period_in_days instead of
container.account.auto_postpone_period_in_days since Account doesn't
delegate that method.

* Test board entropy fallback to account default for invalid periods
2026-03-09 17:37:56 -04:00
Andy Smith f8815fd914 Merge pull request #2603 from nqst/mobile-nav-menu-no-autofocus
Mobile → Jump menu: Remove input autofocus
2026-03-03 09:37:10 -06:00
Fernando Olivares b1cdb72381 Add creator initials and avatar color to push notification payload
Move avatar_background_color logic from helper to User::Avatar concern
so it can be accessed from models. Include creator_id, creator_initials,
and creator_avatar_color in native push notifications for local avatar
rendering on iOS.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 19:31:13 +01:00
Alexander Zaytsev 6099884511 Remove jump menu input autofocus on touch screens 2026-02-24 15:57:42 +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
Adrien Maston 9569032403 Move helper to bridge helper file 2026-02-20 13:03:28 +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
Adrien Maston 1ee37f046c Move helper to bridge helper file 2026-02-20 12:46:00 +01:00
Mike Dalessio 851f13a934 Render inline code in card titles (#2518)
* Remove unused marked JS dependency

* Remove unused redcarpet dependency

* Render inline code in card titles

Add card_html_title helper that HTML-escapes input then converts
backtick-wrapped text to <code> elements. Apply to card titles in
board preview, card detail, public views, and notification emails.
Style inline code elements in titles to match description styling.

Co-authored-by: Andy Smith <andy@37signals.com>

---------

Co-authored-by: Andy Smith <andy@37signals.com>
2026-02-12 12:07:40 -05:00
Stanko Krtalić 61144667fc Merge pull request #2512 from basecamp/server-side-notification-grouping
Stack notifications in all views
2026-02-12 10:33:12 +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
Zoltan Hosszu 343bf016a3 Removing duplicate code language picker 2026-02-12 09:54:21 +01:00
Andy Smith b3951564bc Only disable the current column if it's open 2026-02-09 16:02:02 -06:00
Adrien Maston 4072688974 Use a dedicated link to bridge a "go to" board button 2026-02-05 17:36:48 +01:00
Adrien Maston 626b8aa8a6 Revert "Show "Go to" board button in card perma"
This reverts commit d689f560b4.
2026-02-05 17:31:37 +01:00
Adrien Maston d689f560b4 Show "Go to" board button in card perma 2026-02-05 17:04:03 +01: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
Mike Dalessio cb61b36715 Allow boosts on cards (#2411)
* Add reactions association to Card model

Adds `has_many :reactions` to Card, matching the implementation in Comment.
This allows cards to be reacted to directly with emoji reactions.

The association:
- Orders reactions chronologically
- Uses polymorphic `:reactable` interface
- Deletes reactions when card is destroyed

Includes test coverage for the new association.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add reactions UI to card detail view

- Create Cards::ReactionsController with turbo stream responses
- Add card reactions views (reactions list, new form, menu partial)
- Position reaction button flush-right when no reactions exist
- Show reactions on bottom-left when present, with button inline
- Handle narrow viewports by flowing button below meta section
- Add controller tests for card reactions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add boost count to card preview

Display reaction count alongside comment count on card tiles in board
columns. Introduces a .card__counts wrapper to group both counts with
proper positioning on all viewport sizes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Consolidate reaction views for cards and comments

Extract shared views to app/views/reactions/ using polymorphic routing.
Both card and comment reactions now render the same partials, with a
helper to compute the correct path prefix for nested routes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix emoji picker width in card reactions

Override .card .popup { inline-size: 260px } for the reaction popup
so the emoji grid displays without horizontal scrollbar.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Hide boost count where comment count is hidden

Add .card__boosts alongside .card__comments in:
- Tray view (display: none)
- Cards with background images (opacity toggle on hover)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix reactions button overlap with zoom button in card footer

When a card has a background image, the footer contains both a reactions
button and a zoom button. Previously they would overlap because the
reactions button was absolutely positioned to the bottom-right.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Tighten up previews

* Move card reactions from meta partial to container

Fixes two issues:

1. Reactions were duplicated each time a card was assigned because the
   turbo stream replaced the meta div with the full perma/meta partial,
   which included reactions outside the replaced element.

2. Draft cards incorrectly showed the boost button because the meta
   partial was shared between published and draft containers.

Moving reactions to _container.html.erb (published cards only) fixes
both issues and keeps the meta partial focused on meta content.

Fixes https://app.fizzy.do/5986089/cards/3837
Fixes https://app.fizzy.do/5986089/cards/3835

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* WIP adjust perma page

* Position and style the footer

* Render the stamp in the card body instead of the footer

* Fix undefined local variable in public cards view

Changed `card` to `@card` when rendering the stamp partial.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Preload card reactions to avoid N+1 queries

Include reactions and their reacters in the preloaded scope, matching
what we already do for comments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add model tests for card and comment reaction cleanup

Test that:
- Creating a card reaction touches the card's last_active_at
- Reactions are deleted when their parent comment is destroyed
- Reactions are deleted when their parent card is destroyed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Minor improvements to reactions code

- Use size instead of count in boosts partial to avoid extra SQL query
  on already-loaded collection
- Add else clause to reaction_path_prefix_for to raise ArgumentError
  for unknown reactable types instead of silently returning nil

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Bump specificity of reaction popup in the card perma

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Andy Smith <andy@37signals.com>
2026-01-23 13:25:55 -05: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
Jay Ohms cc4e19bb20 Remove reference to removed controller 2026-01-19 12:47:11 -05:00
Jay Ohms b5985efdd1 Use private functions for bridge components 2026-01-19 10:05:48 -05:00
Adrien Maston 511396144a Setup proper focus handling for mobile on the card perma's board picker 2026-01-19 15:33:12 +01:00
Adrien Maston 44732a345b Move dialog focus handling into the dialog controller
... instead of a separate dialog focus controller
2026-01-19 11:42:43 +01:00
Jay Ohms 600ee87d51 Merge branch 'main' into mobile/bridge-components
* main:
  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
  Use correct class selectors to target cards with  background images
  Update lexxy to latest
  Hide table button for now
  Table CSS tweaks
  Update to Lexxy 0.7.0beta
  Revert "Wrap tables in div"
  Wrap tables in div
  CSS updates for `<table>` support
  Update to latest Lexxy
  Show only active subscriptions
  Add paid accounts stats to admin dashboard
  Keep URLs in webhook events absolute
  Delete orphaned watches and pins when a card is moved to a private board
2026-01-16 12:44:55 -05:00
Mike Dalessio 9c76002bc1 Completing a step removes stalled status from UI
Add `updatedAt` to stalled bubble options so JS can check if the card
was recently updated, matching the `Card::Stallable#stalled?`
logic. Refresh the bubble via Turbo Stream when a step is updated.

This should have been part of #1625

Fixes https://app.fizzy.do/5986089/cards/3668
2026-01-16 09:58:21 -05:00
Jay Ohms 3cada3ce82 Merge branch 'main' into mobile/bridge-components
* main:
  Add rollback script to convert relative URLs back to absolute
  Add a script to migrate existing rich texts to relative URLs
  Use relative URLs where possible across all the app
  Use relative URLs for avatars and rich text attachments
2026-01-14 09:39:08 -05:00
Rosa Gutierrez 235890e666 Use relative URLs for avatars and rich text attachments
These URLs can be problematic or inconsistent, as we might end up with
rich text content with beta URLs for attachments being used in
production, or viceversa. It'll also be problematic when importing or
exporting data between a self-hosted instance and the SaaS version.
2026-01-14 11:01:42 +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
Andy Smith c8059dea90 Disable card column buttons when active 2026-01-13 16:15:33 -06:00
Adrien Maston 3d092583eb Move dialog focus handling to a stimulus controller
... for template caching
2026-01-12 17:30:16 +01:00
Adrien Maston caafebbf22 Extract title to helper 2026-01-12 14:55:32 +01:00
Jay Ohms cf3efce57c Move the rest of the visible card perma buttons to the overflow menu 2026-01-09 13:39:05 -05:00
Adrien Maston 8bf2397c4a Don't make all buttons bigger on mobile 2026-01-09 11:57:16 +01:00
Jay Ohms 9ac34f8882 Only apply the "Don't/Watch this" bridge target for the text variant (for the overflow on the board perma) 2026-01-08 22:46:47 -05:00
Jay Ohms 2b0c4b4c69 Send icon urls with buttons and resolve duplicate bridge items on the board perma since there are duplicate hidden elements 2026-01-08 22:01:08 -05:00
Jay Ohms b9dcc3c08f Update bridged overflow menu items for settings links 2026-01-08 16:36:12 -05:00
Jay Ohms b6aac0ba73 Introduce a bridge helper to get icon asset urls 2026-01-08 16:35:17 -05:00
Adrien Maston f848a492a4 Use already existing buttons to populate the top nav bar 2026-01-08 17:32:21 +01:00
Denis Švara 37467743b3 Remove bridge button metadata from board settings link. 2026-01-08 16:37:42 +01: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