Skip to content

Sync Basecamp Fizzy and prepare Cloudron 1.2.5 - #2

Merged
patattzel merged 152 commits into
mainfrom
sync-upstream-2026-07-22
Jul 22, 2026
Merged

patattzel merged 152 commits into
mainfrom
sync-upstream-2026-07-22

Conversation

@patattzel

Copy link
Copy Markdown
Owner

Summary

  • merge basecamp/fizzy@1476c215d (149 upstream commits) into the Cloudron fork
  • preserve the existing Cloudron packaging and fork-specific signup/tag behavior
  • bump the package catalog to Cloudron release 1.2.5
  • align Dockerfile.cloudron with Ruby 3.4.8
  • adapt Cloudron URL, SMTP, persistent logging, VAPID, and Solid Queue settings to the current upstream runtime
  • keep Cloudron's primary, cable, queue, and cache roles on its single MySQL add-on database
  • keep the fork's existing GitHub workflows unchanged so this sync can be reviewed without changing publishing credentials

Verification

  • 1,528 Rails tests on SQLite: 0 failures
  • 1,528 Rails tests on MySQL 8.0: 0 failures
  • Cloudron-style production boot against one MySQL database
  • Solid Queue running in Puma and GET /up: HTTP 200
  • production asset precompilation
  • RuboCop, Brakeman, Bundler Audit, Importmap Audit, bundle drift
  • actionlint, shellcheck, JSON metadata validation

djmb and others added 30 commits April 3, 2026 08:50
beginningOfDay() used local timezone methods (getFullYear, getMonth,
getDate) to snap timestamps to midnight. Since the server sends UTC
timestamps, this caused day boundary calculations to be off by one
for users in UTC-negative timezones — cards created after UTC midnight
but before local midnight showed as "yesterday" instead of "today".

Switch to UTC methods (getUTCFullYear, getUTCMonth, getUTCDate) so day
boundaries are calculated consistently with the server's UTC timestamps.

Affects DaysAgoFormatter, DaysAgoOrWeekdayFormatter, TimeOrDateFormatter,
InDaysFormatter, and bubble controller stalled/entropy calculations.
Fix off-by-one date display for UTC-negative timezone users
record.to_json serializes through model accessors. Column::Colored
overrides the color accessor to return a Color struct, which serializes
as {"name":"Blue","value":"var(--color-card-default)"} instead of the
raw CSS string.

Two fixes:
- Export raw DB values via record.attributes.slice(*attributes).to_json
- Color.for_value parses legacy JSON format so columns imported from
  old exports self-heal when read
Fix export/import losing custom column colors
Revert beginningOfDay() to use local timezone methods — the UTC change
from basecamp#2790 caused cards created earlier the same day to show "yesterday"
for users in UTC-negative timezones after their local 7 PM.

Add Time.zone.name to day timeline fragment cache keys so
timezone-different renders don't collide.
Fix timezone handling for day timeline and card dates
Account incineration could leave orphaned records due to missing cascade
declarations and async jobs failing when the account was already gone.

Cascade fixes:
- Add Account::Searchable concern to clean up Search::Query (delete_all)
  and Search::Record (destroy_all, respects SQLite FTS dependent: :destroy)
- Add before_destroy in Account::Storage to delete storage entries
- Suppress storage entry recording during incineration so attachment
  purge callbacks don't create entries or enqueue materialize jobs
- Guard Access#clean_inaccessible_data_later with unless user.destroyed?
  to avoid enqueuing pointless jobs during user cascade

Job tenancy:
- Extract AccountTenanted concern from the global ActiveJob initializer
  into ApplicationJob (include) with targeted prepends for
  ActionMailer::MailDeliveryJob and Turbo broadcast jobs
- Defer account resolution from deserialize to perform so that missing
  accounts raise DeserializationError inside the execution path where
  discard_on can handle it

Tests:
- Comprehensive incineration test covering 35 model types with
  before/after assertions and full enqueued job processing
- Mailer deliver_later test verifying account context survives job
  serialization for multi-account users
- Turbo broadcast test verifying account-scoped URLs in rendered partials
…scade-gaps

Fix account destroy cascade gaps
)

* Split docs/API.md into per-resource sections under docs/api/

* Move API endpoints index above authentication in docs/api/README.md

* Fix trailing comma in boards.md JSON example

* Fix trailing comma in cards.md, add Response label to identity.md, add Rich Text to endpoint index
* Bump thruster from 0.1.19 to 0.1.20

Bumps [thruster](https://github.com/basecamp/thruster) from 0.1.19 to 0.1.20.
- [Changelog](https://github.com/basecamp/thruster/blob/v0.1.20/CHANGELOG.md)
- [Commits](basecamp/thruster@v0.1.19...v0.1.20)

---
updated-dependencies:
- dependency-name: thruster
  dependency-version: 0.1.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Sync Gemfile.saas.lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…2795)

Bumps the github-actions group with 1 update: [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer).


Updates `sigstore/cosign-installer` from 4.1.0 to 4.1.1
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](sigstore/cosign-installer@ba7bc0a...cad07c2)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-version: 4.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump trilogy from 2.10.0 to 2.11.1

Bumps [trilogy](https://github.com/trilogy-libraries/trilogy) from 2.10.0 to 2.11.1.
- [Release notes](https://github.com/trilogy-libraries/trilogy/releases)
- [Changelog](https://github.com/trilogy-libraries/trilogy/blob/main/CHANGELOG.md)
- [Commits](trilogy-libraries/trilogy@v2.10.0...v2.11.1)

---
updated-dependencies:
- dependency-name: trilogy
  dependency-version: 2.11.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Sync Gemfile.saas.lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Bump lexxy from 0.9.0.beta to 0.9.1.beta

Bumps [lexxy](https://github.com/basecamp/lexxy) from 0.9.0.beta to 0.9.1.beta.
- [Release notes](https://github.com/basecamp/lexxy/releases)
- [Commits](basecamp/lexxy@v0.9.0.beta...v0.9.1.beta)

---
updated-dependencies:
- dependency-name: lexxy
  dependency-version: 0.9.1.beta
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Sync Gemfile.saas.lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add JSON API for webhook deliveries

* Extract sanitized_request method on Webhook::Delivery

* Extract response_summary method on Webhook::Delivery
* Document avatar removal API endpoint

* Document notification settings API endpoints

* Document access token list and delete API endpoints

* Document join code API endpoints

* Fix access token delete URL parameter name in docs
* Add board settings fields to board JSON responses

* Move public_description fields to board partial, gate on published

* Add index test for public_description fields on published boards

* Update app/views/boards/show.json.jbuilder

Prefer `unless` to `if !`

---------

Co-authored-by: Mike Dalessio <mike.dalessio@gmail.com>
* Add JSON events API endpoint

* Add regression test for event particulars defaults

* Move JSON events API to a dedicated ActivitiesController

The events endpoint served both the HTML day timeline and the JSON API
feed, but the two paths shared no data or behavior — the HTML side uses
DayTimelinesScoped while the JSON side built its own query. Splitting
into ActivitiesController gives the API its own home at
GET /:account/activities.json without dragging in the timeline
before_actions.

Also preloads comment creator in Event.preloaded to avoid an N+1 when
rendering comment eventables in the JSON feed.
* Add JSON API support for timezone update

* Simplify timezone controller to just head :no_content

* Use PUT instead of PATCH in timezone tests to match docs

* Use PATCH instead of PUT for timezone endpoint

Reverts tests to use patch and updates docs heading to PATCH
for consistency.
* Upgrade addressable from 2.8.9 to 2.9.0

Security release fixing ReDoS vulnerabilities in Addressable::Template#match.
No application impact — fizzy does not use Addressable::Template directly.

* dep: fix saas drift
* Bump loofah from 2.25.0 to 2.25.1

Bumps [loofah](https://github.com/flavorjones/loofah) from 2.25.0 to 2.25.1.
- [Release notes](https://github.com/flavorjones/loofah/releases)
- [Changelog](https://github.com/flavorjones/loofah/blob/main/CHANGELOG.md)
- [Commits](flavorjones/loofah@v2.25.0...v2.25.1)

---
updated-dependencies:
- dependency-name: loofah
  dependency-version: 2.25.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Sync Gemfile.saas.lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Bump rack from 3.2.5 to 3.2.6

Bumps [rack](https://github.com/rack/rack) from 3.2.5 to 3.2.6.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](rack/rack@v3.2.5...v3.2.6)

---
updated-dependencies:
- dependency-name: rack
  dependency-version: 3.2.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Sync Gemfile.saas.lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Move MinIO from minio.localhost to minio.fizzy.localhost, which makes
it same-site with the app, so the CORS redirect succeeds.

The service worker fetches Active Storage URLs with `mode: "cors"` so
it can inspect response sizes for offline caching. Active Storage's
redirect controller returns a 302 to the MinIO presigned URL. When
that redirect crosses site boundaries (from fizzy.localhost to
minio.localhost), the browser sets the Origin header to "null" on the
redirected request per the Fetch spec, which fails the CORS check and
produces net::ERR_FAILED.
…arer-downloads

Allow bearer auth for Active Storage download endpoints
puffo and others added 28 commits July 8, 2026 21:41
* Allow disabling CORS fetch mode in the service worker

Self-hosted instances using cross-site S3-compatible storage have no
load balancer to add CORS headers to Active Storage redirects, so the
service worker's `mode: "cors"` fetch fails and inline images break.
Setting SERVICE_WORKER_CORS_ENABLED=false omits the CORS fetch option.

* Switch embedded ERB to block-style
* Add (account_id, board_id, status) index to cards

The account-scoped card-list query (Filter#cards: published, open,
not-snoozed cards across an account's boards) had no index covering
account_id + board_id + status together. The closest index,
(account_id, last_active_at, status), can't serve a board_id filter,
so for large accounts the optimizer degrades to reading all of the
account's cards. This drove the df-iad Fizzy DB latency incident when
InnoDB stats recalculation tipped the plan toward a scan.

Adds a composite index so the account+board+status predicate has a
stable index path.

* Drop explicit index name from cards migration

Rails auto-derives index_cards_on_account_id_and_board_id_and_status
from the column list, so the explicit name: was redundant. No functional
change — schema.rb is identical.

* Add ActiveRecord optimizer hint extension (use_index / join_prefix)

Ports the query-optimizer-hint helpers so relations can emit MySQL 8
optimizer-hint comments (INDEX, JOIN_PREFIX). Comments are ignored by
other adapters (SQLite, MariaDB), so this is a safe no-op there.

Enables forcing a specific index on a relation, e.g.
Card.use_index(:index_cards_on_account_id_and_board_id_and_status).

* Pin composite index on the auto-postpone entropy sweep

The hourly Card.auto_postpone_all_due sweep queries each account's
active cards scoped to a board group. For a large account's selective
board group the (account_id, board_id, status) index is the right plan
(~30ms), but when InnoDB statistics go stale the optimizer can flip to
an account-wide scan (multi-second). Pinning the index with use_index
makes this background job's plan stats-independent and caps the tail.
Scoped to this sweep only; no other query is affected.
Bumps lexxy from 0.9.14.beta to 0.9.23 (latest). Many editor fixes landed
upstream since 0.9.14.beta, including paste, selection, and focus handling —
potentially relevant to the Firefox card-title focus-loss report.

Both Gemfile.lock and Gemfile.saas.lock updated in lockstep; no other gems
changed.
CardsController#index (Filter#cards) got slow on large accounts —
hundreds of ms to seconds of DB time for the /<acct>/cards?board_ids[]=...
endpoint: the account's card list with the Card.active anti-joins, a
board_id IN (...) filter, and the default ORDER BY last_active_at DESC, id DESC.

Filtering by board goes through creator.accessible_cards (an accesses INNER
JOIN) and anchors the plan on index_cards_on_board_id — a range scan over
every published card on the boards — then a filesort by last_active_at to
return one page.

Keeping accessible_cards preserves the authorization guarantee: the accesses
join is enforced by the query and never depends on the board list being
pre-filtered. Adding a redundant account_id predicate (every selected board
belongs to the creator's account) makes
index_cards_on_account_id_and_last_active_at_and_status usable, and pinning it
holds the plan on that index's reverse scan — serving the ordering directly and
stopping at the page limit, no filesort. With the predicate alone the optimizer
estimates the board-index plan as cheaper, so stale statistics can flip it back;
the pin keeps the fast plan. It is skipped when an assignee, tag, or term filter
adds a has-many join, where a different plan wins.

On a 40k-active-card account filtered to 15 boards: 48ms -> 0.9ms of DB time,
accesses join retained, no filesort. Result sets unchanged.
…ization

Speed up the card list for large accounts
…ex-hint

Drop the index hint from the auto-postpone sweep
~> 2.11 → ~> 2.12. Updated both Gemfile.lock and Gemfile.saas.lock.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…2977)

* Add a Brewfile declaring the macOS system packages

* Migrate bin/setup to mise's declarative bootstrap pipeline

Declare the inline pacman package list as [bootstrap.packages] in
.mise.toml and install it via mise bootstrap. macOS packages move to
the Brewfile, installed with a real brew bundle: mise's brew path
self-pours dependency closures that collide with brew-linked kegs
and is arm64-only.

Reorder the fresh-machine prelude so native packages are installed
before language tools: Bundler native extensions need the system
libraries regardless of how ruby was built. The full sequence is now
mise install/upgrade with a 2026.7.5 version floor and self-escalation,
config trust, platform manager detection, native packages, mise tools,
then hook-env before any app work.

gum becomes a mise-managed tool (0.17.0, the bc3-proven pin) instead of
a brew/pacman preinstall, so step() falls back to plain echo until mise
install has run.

* Converge the mise floor upgrade across package owners

The upgrade branch stranded package-manager installs: dpkg-owned mise fell
through to `mise self-update`, which mise disables for package-manager
installs, so setup exited at the floor check with no usable upgrade path,
and the pacman branch's -Sy is a partial-upgrade shape Arch does not
support. Mirror Shipyard's ensure-mise policy, byte-identically with the
other app setups: brew-owned → brew upgrade; pacman-owned → full pacman
-Syu; dpkg-owned → deliberate mise.run ownership change with a PATH
refresh; curl-owned → mise self-update; strict floor check afterward
either way.

* Drop --update from the pacman packages phase

mise 2026.7.5 maps --update for pacman to a bare `pacman -Sy` before the
targeted `pacman -S --noconfirm --needed` (packages/pacman.rs refresh()),
which is Arch's unsupported partial-upgrade shape: sync databases move
ahead of the installed system and later installs can break ABI. Split the
invocation by manager — apt keeps --update (a plain list refresh); pacman
installs against the existing synchronized database.

* Harden the setup prelude from the review round

- Treat a gum that resolves to a mise shim as unavailable in step(): before
  this config is trusted (or with a below-floor mise) the shim aborts,
  which would kill setup at the very first step banner.
- Drop the dpkg ownership-change arm from the mise floor upgrade: fizzy
  supports only Homebrew and pacman, so on an apt host the branch would
  mutate ~/.local/bin and then hit the Unsupported platform gate anyway.
  The lockstep harness pins this variant as canonical-minus-dpkg.

* Probe gum by execution; pick the package manager by OS

- step()'s shim guard matched only the default mise shims path, missing
  custom MISE_DATA_DIR/shim locations. Probe by running `gum --version`
  instead: an aborting shim (untrusted config, below-floor mise) falls back
  to plain echo without killing setup, and a working gum is used styled.
- Manager detection preferred whatever was first on PATH, so a Linux
  machine with Homebrew installed would run the macOS Brewfile and skip its
  declared Linux packages. Select by OS: Darwin+brew, else apt/pacman on
  Linux, else a legible unsupported-platform stop.

* Refresh the brew formula index before installing or upgrading mise

Found live on the fresh-macOS signoff VM: the image ships mise 2026.6.0
with a formula index from image-build time, so `brew upgrade mise` was a
no-op ("already installed") and setup died at the version floor with no
converge path. Run `brew update --quiet` (best-effort) before both the
install-if-missing and the below-floor upgrade — never on converged no-op
runs, since both branches are gated on mise being missing or old.

* Upgrade the active mise by provenance; accept ssh:// origin forms

- The floor-upgrade branch classified brew ownership by keg presence, so a
  machine where PATH resolves a pacman/dpkg/mise.run mise while a brew keg
  also exists would upgrade the inactive brew copy and still die at the
  floor. Classify by the resolved binary's owner instead: under brew
  --prefix → brew; pacman -Qo → full -Syu; dpkg -S → mise.run ownership
  change; else self-update.
- The docker-dev origin rewrite now also matches the ssh://git@github.com/
  URL forms, which mise's origin comparison likewise refuses to equate
  with the declared https URL.

* Install mise via brew only on macOS

The install-if-missing arm keyed on brew's presence, so a Linuxbrew host
would gain a brew-owned mise moments before the manager gate rejects the
platform (no pacman) or selects apt — a mutation on a path that can't
benefit from it. Scope the arm to Darwin; unsupported hosts now stop at
the existing "Please install mise" guidance with nothing changed. The
in-kind upgrade arm keeps handling an existing Linuxbrew-owned mise by
provenance.
SaaS setup cloned/pulled docker-dev imperatively (gh repo clone / git pull)
with none of the fleet's origin or auth handling. Replace it with mise's
declarative repos phase, scoped to a mise.saas.toml environment overlay
loaded only under MISE_ENV=saas — private Basecamp infrastructure is
declared ONLY there, never in the OSS root .mise.toml, and OSS setups never
load or reach it.

saas/bin/setup now trusts the overlay, carries the fleet's fenced
docker-dev origin block (shipyard-block: docker-dev-origin v1 — https-auth
probe before fresh clones and canonical-ssh rewrites, guided stop on
missing auth, forks/dirty left for mise), and converges the checkout with
MISE_ENV=saas mise bootstrap --only repos --yes before starting services.

SaaS remains macOS/Omarchy-only, per the platform gate.
…no 406, no keystroke clobber) (basecamp#2979)

* Fix BC-10091763201: send turbo-stream Accept from autosave to stop 406

Root cause: submitForm() built a FetchRequest with no responseKind, so
@rails/request.js defaulted to Accept: text/html. The drafted-card autosave
POSTs (with _method=patch) to CardsController#update, whose respond_to only
registers turbo_stream and json — no html — so Rails raises UnknownFormat and
returns 406 Not Acceptable on every autosave. (No data loss: @card.update!
commits before respond_to raises; what's lost is the turbo_stream UI update
and the log fills with 406s.)

Fix: pass responseKind: "turbo-stream" so the request declares the Accept
header the action serves. Sole caller is the draft autosave, so this also lets
the update.turbo_stream.erb side effects (draft container morph, closure toggle)
actually apply after each save, as intended.

Card: https://app.basecamp.com/2914079/buckets/27/card_tables/cards/10091763201

* Draft autosave persists via JSON so it can't clobber in-flight edits

The drafted-card autosave posted with no responseKind, defaulting to
Accept: text/html — a format CardsController#update doesn't serve — so
every autosave 406'd and the draft's edits never persisted
(BC-10091763201).

Requesting turbo-stream clears the 406 but pulls in update.turbo_stream's
container morph. For a drafted card that container *is* the editing form,
so each autosave re-rendered the fields under the cursor and dropped any
keystrokes typed while the save was in flight (BC-10036823881): typing
"abcdefghijklmnop" landed as "abcde_ghij_lmnop".

The autosave is fire-and-forget — auto_save_controller awaits and
discards the response — so it never needed to render anything. Request
JSON instead: #update acknowledges through its existing format.json
branch, clearing the 406 with no Turbo Stream to re-render (and clobber)
the form. Image uploads submit as a native Turbo form and still morph the
container to show the image.

Card: https://app.basecamp.com/2914079/buckets/27/card_tables/cards/10091763201
Card: https://app.basecamp.com/2914079/buckets/27/card_tables/cards/10036823881

* Address review: accurate comment + deterministic autosave test

- form_helpers: the autosave does receive a JSON response (CardsController#
  update's format.json renders :show, an existing tested contract other JSON
  clients rely on); it just ignores the body. Reword the comment so it no
  longer claims "without rendering a response".
- draft_autosave_test: replace the window.fetch flag + fixed sleep with a real
  barrier — capture the autosave's fetch promise, await it plus two animation
  frames so request.js has finished applying any Turbo Stream, then restore
  window.fetch. Deterministic RED (turbo-stream clobbers to "abc") / GREEN.

* Drop the draft-autosave system test

Its value was the RED/GREEN proof during this PR (turbo-stream clobbers
"abcdef" -> "abc"; json doesn't) — banked in the PR history. As a permanent
regression test, a full browser test with fetch monkeypatching and an rAF
barrier to pin a one-line format choice against an unlikely reversion isn't
proportionate. The comment on submitForm carries the rationale as the guard.
We never make tagged releases here, so there isn't a 'latest' image which is unusual. We treat 'main' as 'latest' and keep it stable, so it is effectively 'latest', this just codifies it.
…h-latest

Tag all pushes to main as 'latest' in Docker
The guard blocked the usual private, loopback, and link-local ranges (and
the IPv4-mapped/-compatible IPv6 forms) and CGNAT, but let through NAT64,
6to4, and Teredo addresses, which can point at an internal IPv4.

Now it pulls the IPv4 out of a NAT64 address and checks that (so NAT64 to a
public site still works), blocks 6to4 and Teredo outright, and adds the
missing IPv4 and IPv6 ranges.
The local-use NAT64 prefix (64:ff9b:1::/48, RFC 8215) embeds an IPv4
target in its low 32 bits just like the well-known prefix, so run it
through the same embedded-IPv4 recheck: local-use NAT64 to a public
address still resolves while local-use NAT64 to an internal address is
blocked.

Also block the IPv6 benchmarking range (2001:2::/48, RFC 5180) to match
the IPv4 benchmarking block on 198.18.0.0/15.
…nsition-guard

Block IPv6 addresses that reach internal IPs in the SSRF guard
…ect/disconnect (basecamp#2978)

* Fix BC-10091759496: stop leaking a document keydown listener per board visit

Root cause: connect() registered document.addEventListener("keydown",
this.handleKeyDown.bind(this)) and disconnect() called removeEventListener with a
FRESH this.handleKeyDown.bind(this). .bind() returns a new function each call, so
the removal never matched the registered listener — every board visit (Turbo
connect/disconnect) leaked one permanent document keydown listener. Each leaked
listener fires on any Shift-modified keystroke and rebuilds 6 Audio objects, so
typing degrades progressively over a session — worst in long-lived Safari/PWA
sessions that never full-reload.

Fix: store the bound handler once in connect() and remove that same reference in
disconnect(), so the listener is actually cleaned up.

Confirmed in WebKit (Safari engine): current code leaks 1 listener/visit
(1..10 over 10 visits); with this fix the count stays flat at 0.

Card: https://app.basecamp.com/2914079/buckets/27/card_tables/cards/10091759496

* Fix the same listener-removal identity mismatch in tooltip and dialog_manager

Same defect class as the drag_and_strum fix: connect() adds a listener with an
inline .bind(this) and disconnect() removes a fresh .bind(this) that never matches.
These two bind to this.element (not document), so they don't leak unbounded the way
the drag_and_strum document listener did — the listener dies when the element is
GC'd. But across a disconnect/reconnect of the same element (cached Turbo previews,
morphing) they stack duplicate listeners, so the handler fires N times per event.
Store the bound reference once and remove that same reference.

Pattern: event-listener-removal-identity-mismatch (bug-reports/patterns).
When a card's title or description was edited, other sessions viewing
the card never saw the change until a manual reload. The refresh
broadcast fired and other sessions morphed, but the title and
description sat inside an unconditional data-turbo-permanent wrapper,
so every morph skipped them and preserved the stale content.

The wrapper existed to solve two real problems: d6b602b made the
edit frame permanent so a broadcast refresh couldn't morph away an
edit in progress, and 649888d moved the attribute off the frame onto
an id-less wrapper div to stop Turbo transplanting the frame and
duplicating the Lexxy editor (basecamp/lexxy#263). The side effect
was that the exemption applied to every card being viewed, not just
to a card being edited.

Permanence is now applied only while editing. The morph-guard
Stimulus controller, attached to the card edit form, marks the
enclosing turbo-frame data-turbo-permanent on connect and removes it
on disconnect. Display mode morphs normally and an open editor still
survives refreshes. The attribute never appears in server-rendered
markup, so Turbo never transplants the frame across page loads and
the lexxy#263 dup can't recur (its underlying bug was also fixed
upstream in basecamp/lexxy#474, included in the 0.9.23 we pin).
…-refresh

Morph card title and description on broadcast refreshes
Sync Basecamp Fizzy through 1476c21 while retaining the existing fork workflows and Cloudron packaging.
@patattzel
patattzel merged commit 0761a05 into main Jul 22, 2026
5 checks passed
@patattzel
patattzel deleted the sync-upstream-2026-07-22 branch July 22, 2026 22:29
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.