Skip to content

Commit 6a1e03b

Browse files
authored
Merge branch 'main' into registration-sequences-preview
2 parents e14dba4 + a22645b commit 6a1e03b

238 files changed

Lines changed: 3296 additions & 1019 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/pr/SKILL.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,20 @@ The workflow below (steps 0–3) always runs and creates or updates the PR. When
2626

2727
Invoke the `/simplify` command to review the changed code for reuse, simplification, and efficiency cleanups and apply them. Do this first, before writing the PR up, so the body describes the diff's final shape rather than a first draft. It's quality-only — it won't touch correctness — so it's safe to run unattended here; if it reports nothing to clean up, move on.
2828

29-
Then run `bin/lint` to auto-format the code (it also picks up whatever `/simplify` just changed). Always use `bin/lint`, never another formatter or `standardrb` directly. Scope it to the branch's files rather than walking the whole repo — `bin/lint $(git diff --name-only --diff-filter=d "origin/$BASE"...HEAD)`; `--diff-filter=d` drops deleted paths so they don't show up as "Not found". Files with no linter (`.haml`, `.scss`, `.md`) are skipped, so a branch that touches none of the lintable types exits cleanly rather than looking like a lint failure. It takes directories too, so `bin/lint app/components/foo` works while you're still iterating.
29+
Then run `bin/lint` to auto-format the code (it also picks up whatever `/simplify` just changed). Always use `bin/lint`, never another formatter or `standardrb` directly. Scope it to the branch's files rather than walking the whole repo — `bin/lint $(git diff --name-only --diff-filter=d "origin/$BASE"...HEAD)`; `--diff-filter=d` drops deleted paths so they don't show up as "Not found". Files with no linter (`.haml`, `.scss`, `.md`) are skipped, so a branch that touches none of the lintable types exits cleanly rather than looking like a lint failure. It takes directories too, so `bin/lint app/components/foo` works while you're still iterating. Never revert what the linter wrote — if a too-broad run reformats files outside the branch, those fixes stay in the diff.
3030

3131
Scope specs the same way — the ones covering what the branch changed, never a bare `bundle exec rspec` or a whole top-level directory (see the `rspec-testing` skill). CI runs the full suite; a green PR isn't your job to prove locally.
3232

3333
Then review the changed files against the repo's `CLAUDE.md` (root and any nested ones in touched directories) and fix anything that doesn't conform — code-style guidelines (functional style, no argument mutation, omitted hash values like `{x:}`, private methods, unabbreviated names, pithy comments), testing conventions, and frontend rules. Only touch lines this branch already changed; don't reformat unrelated code.
3434

35+
Then check the branch's translations for a hardcoded "bike" where the string means the registration's cycle type — a registration is as often an e-scooter, a stroller or a wheelchair:
36+
37+
```bash
38+
git diff "origin/$BASE"...HEAD -- '*.en.yml' 'config/locales/en.yml' | grep -in '^+.*bike'
39+
```
40+
41+
Read each hit. Key names (`about_this_bike:`), the product name ("Bike Index"), and copy that really is bike-only are fine; a value saying "bike" about the registration is not. Fix it by interpolating `%{bike_type}` in the value and passing `bike_type: bike.type` at the call site — `Registrations::Show::CurrentAlerts::ClaimImpound` and `Registrations::Show::WrapperConsumer` are the pattern, and `spec/components/registrations/show/current_alerts/claim_impound/component_spec.rb` shows how to cover it. After hand-editing a `component.en.yml`, run `bundle exec rails prepare_translations``bin/lint` doesn't normalize YAML.
42+
3543
Commit these edits before continuing — step 1's `git merge` needs a clean working tree, and committing here is what lets the step 0 edits ride along the merge as ordinary branch commits (which step 3 then pushes).
3644

3745
### 0.5. Determine the base branch

.claude/skills/sandbox-test-setup/SKILL.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@ sandbox**; `/home/user/bike_index` uses **Claude Code web sandbox**.
3333

3434
## Local macOS (Conductor workspace)
3535

36-
Ruby 4.0.5 is installed via [mise](https://mise.jdx.dev/), but Claude
36+
Ruby 4.0.6 is installed via [mise](https://mise.jdx.dev/), but Claude
3737
Code's shell sometimes spawns subprocesses without the mise shim on
3838
PATH — bare `ruby` then resolves to `/usr/bin/ruby` (2.6) and `bundle`
3939
fails with `Could not find 'bundler' (4.0.0.beta2)`. **The Ruby is
4040
installed; the PATH just isn't right** — don't reinstall, don't edit
4141
the Gemfile.
4242

43-
Check first; only prefix PATH if `ruby -v` doesn't already print 4.0.5
43+
Check first; only prefix PATH if `ruby -v` doesn't already print 4.0.6
4444
(`mise exec -- ruby`/`bundle` are unreliable in this harness — they
4545
can still resolve to system 2.6, so use the direct prefix):
4646

4747
```bash
4848
ruby -v
49-
# If it's not 4.0.5:
50-
export PATH="/Users/seth/.local/share/mise/installs/ruby/4.0.5/bin:$PATH"
49+
# If it's not 4.0.6:
50+
export PATH="/Users/seth/.local/share/mise/installs/ruby/4.0.6/bin:$PATH"
5151
```
5252

5353
Then run specs the normal way:
@@ -111,7 +111,7 @@ Activate mise so its shims put the pinned Ruby and a matching Bundler on PATH
111111
```bash
112112
export PATH="$HOME/.local/bin:$PATH"
113113
eval "$(mise activate bash)"
114-
ruby --version # => ruby 4.0.5 ... [x86_64-linux]
114+
ruby --version # => ruby 4.0.6 ... [x86_64-linux]
115115
bundle install # ~8s once shared-mime-info is present; vendor/bundle + .bundle are gitignored
116116
```
117117

@@ -120,7 +120,7 @@ drops the mise shim (same harness quirk as Local macOS), prefix the install
120120
dir directly instead of reactivating (match the version in `mise.toml`):
121121

122122
```bash
123-
export PATH="$HOME/.local/share/mise/installs/ruby/4.0.5/bin:$PATH"
123+
export PATH="$HOME/.local/share/mise/installs/ruby/4.0.6/bin:$PATH"
124124
```
125125

126126
### Database-backed specs
@@ -134,7 +134,7 @@ applies to any spec that renders the layout.
134134

135135
## Claude Code web sandbox
136136

137-
`Gemfile` pins the Ruby version (`ruby "4.0.5"` at time of writing —
137+
`Gemfile` pins the Ruby version (`ruby "4.0.6"` at time of writing —
138138
**read the current pin from the `ruby` line in `Gemfile`**, it moves) and
139139
`Gemfile.lock` pins `BUNDLED WITH 4.0.15`. No prebuilt binary for that
140140
version is reachable (`cache.ruby-lang.org` is 403'd, `ruby/ruby-builder`'s
@@ -211,8 +211,8 @@ lives only on `/usr/sbin`.
211211

212212
```bash
213213
CHROME_DIR=$(ls -d /opt/pw-browsers/chromium-*/chrome-linux | sort -V | tail -1)
214-
export PATH="/opt/ruby-4.0.5/x64/bin:$CHROME_DIR:/usr/local/bin:/usr/bin:/bin:/usr/sbin"
215-
export LD_LIBRARY_PATH="/opt/ruby-4.0.5/x64/lib:$LD_LIBRARY_PATH"
214+
export PATH="/opt/ruby-4.0.6/x64/bin:$CHROME_DIR:/usr/local/bin:/usr/bin:/bin:/usr/sbin"
215+
export LD_LIBRARY_PATH="/opt/ruby-4.0.6/x64/lib:$LD_LIBRARY_PATH"
216216
bundle install
217217
```
218218

@@ -333,13 +333,13 @@ trusts the self-signed cert.
333333

334334
## End-to-end recap
335335

336-
Assumes the pinned Ruby is already built (paths below use 4.0.5 — swap for
336+
Assumes the pinned Ruby is already built (paths below use 4.0.6 — swap for
337337
the current pin). Combines the steps above:
338338

339339
```bash
340340
CHROME_DIR=$(ls -d /opt/pw-browsers/chromium-*/chrome-linux | sort -V | tail -1)
341-
export PATH="/opt/ruby-4.0.5/x64/bin:$CHROME_DIR:/usr/local/bin:/usr/bin:/bin:/usr/sbin"
342-
export LD_LIBRARY_PATH="/opt/ruby-4.0.5/x64/lib:$LD_LIBRARY_PATH"
341+
export PATH="/opt/ruby-4.0.6/x64/bin:$CHROME_DIR:/usr/local/bin:/usr/bin:/bin:/usr/sbin"
342+
export LD_LIBRARY_PATH="/opt/ruby-4.0.6/x64/lib:$LD_LIBRARY_PATH"
343343
service postgresql start && service redis-server start
344344
apt-get install -y libvips42 # ruby-vips loads at boot; without it every rails/rspec run dies
345345
cd /home/user/bike_index

.cloud66/manifest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
production:
22
rails:
33
configuration:
4+
ruby_version: "4.0.6"
45
node_version: "24.15.0"
56
# usr1 is a Puma phased restart: workers recycle under a master that never dies, so
67
# nginx's socket never disappears. Env var changes still need a hard restart.

.github/ci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Rebuilt automatically (ci.yml's build_ci_image job) whenever this file,
1919
# .tool-versions, or package.json changes.
2020

21-
ARG RUBY_VERSION=4.0.5
21+
ARG RUBY_VERSION=4.0.6
2222
FROM docker.io/library/ruby:$RUBY_VERSION-slim
2323

2424
ENV BUNDLE_PATH=/usr/local/bundle

.github/workflows/kamal-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ jobs:
170170
- name: Set up Ruby
171171
uses: ruby/setup-ruby@v1
172172
with:
173-
ruby-version: "4.0.5"
173+
ruby-version: "4.0.6"
174174
- name: Install Kamal
175175
run: gem install kamal -v "~> 2.0"
176176
- name: Set up SSH agent

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ruby 4.0.5
2-
# NOTE: If updating node version, also update .cloud66/manifest.yml
1+
# NOTE: If updating ruby or node version, also update .cloud66/manifest.yml
2+
ruby 4.0.6
33
nodejs 24.15.0
44

AGENTS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Run `bin/lint` to automatically format the code. Always use `bin/lint`, don't us
1212

1313
**Pass it the files or directories you changed**`bin/lint app/components/ui/table app/models/bike.rb`. A bare `bin/lint` walks the whole repo, which is slow and reformats files you aren't working on. Save it for a final check before pushing.
1414

15+
**Never revert what the linter wrote.** If a too-broad `bin/lint` reformats files outside your change, leave those fixes in the diff — don't `git checkout` them away. Scope the next run more tightly instead.
16+
1517
### Code guidelines:
1618

1719
- Code in a functional way. Avoid mutation (side effects) when you can.
@@ -21,8 +23,10 @@ Run `bin/lint` to automatically format the code. Always use `bin/lint`, don't us
2123
- Omit named arguments' values from hashes (ie prefer `{x:, y:}` instead of `{x: x, y: y}`)
2224
- Prefer less code, by character count (excluding whitespace and comments). Use `bin/char_count {FILE OR FOLDER}` to get the non-whitespace character count
2325
- prefer un-abbreviated variable names
26+
- Use full class/module names everywhere — `UI::Forms::Combobox::Component`, not the `Combobox::Component` that lexical scope also resolves from inside `UI::Forms`
2427
- Keep comments pithy — often they aren't necessary. Explain *why* only where a reader would otherwise get it wrong; don't narrate the change that introduced the code, and don't defend a choice against an edit nobody would make — a failing test already defends it
25-
- **Service objects** (`app/services/`): a stateless service is a `module` with `extend Functionable` (see the `functionable` gem) — inputs passed as args, no instance state, private methods via `conceal` + a `# private below here` block. Reach for a `class` only when the object genuinely holds instance state across methods (e.g. a multi-step builder/updater). Don't write a stateless service as a `class` with `def self.` methods.
28+
- **Prefer composition over inheritance and `include`.** Share behavior by calling an object that owns it, not by mixing a module into several classes or adding a base class. A `module` extracted only to be `include`d in two classes is usually one of those classes with a parameter — pass the difference in as an argument instead. Rails' own extension points (`ApplicationRecord`, `ApplicationJob`, `ActiveSupport::Concern` for controller filters) are fine; new mixins of our own are what to avoid.
29+
- **Service objects** (`app/services/`): a stateless service is a `module` with `extend Functionable` (see the `functionable` gem) — inputs passed as args, no instance state, private methods via `conceal` + a `# private below here` block. Don't write a stateless service as a `class` with `def self.` methods.
2630

2731
## Subagents
2832

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This Dockerfile is used only by review apps (and any future Kamal-based deploys).
55
# Production runs on Cloud66 — not from this file.
66

7-
ARG RUBY_VERSION=4.0.5
7+
ARG RUBY_VERSION=4.0.6
88
FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base
99

1010
WORKDIR /rails

Gemfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ source "https://rubygems.org"
55
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
66
git_source(:gitlab) { |repo| "https://gitlab.com/#{repo}.git" }
77

8-
ruby "4.0.5"
9-
108
# Gems that are no longer in standard library as of Ruby 3.4
119
gem "csv"
1210
gem "observer"

Gemfile.lock

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ GEM
137137
bcrypt (3.1.22)
138138
benchmark (0.5.0)
139139
bigdecimal (4.1.2)
140-
binxtils (0.5.2)
140+
binxtils (0.6.0)
141141
functionable
142142
loofah
143143
rails
@@ -244,7 +244,7 @@ GEM
244244
dry-logic (~> 1.4)
245245
zeitwerk (~> 2.6)
246246
equalizer (0.0.11)
247-
erb (6.0.6)
247+
erb (6.0.7)
248248
erubi (1.13.1)
249249
excon (0.76.0)
250250
execjs (2.7.0)
@@ -438,7 +438,7 @@ GEM
438438
rdoc (>= 4.0.0)
439439
reline (>= 0.4.2)
440440
jmespath (1.6.2)
441-
json (2.21.1)
441+
json (2.21.2)
442442
jwt (3.2.0)
443443
base64
444444
knapsack_pro (10.0.1)
@@ -674,7 +674,7 @@ GEM
674674
rb-fsevent (0.11.2)
675675
rb-inotify (0.11.1)
676676
ffi (~> 1.0)
677-
rbs (4.1.0)
677+
rbs (4.1.2)
678678
logger
679679
prism (>= 1.6.0)
680680
tsort
@@ -900,7 +900,7 @@ GEM
900900
nokogiri (~> 1.8)
901901
yaml (0.4.0)
902902
yard (0.9.44)
903-
zeitwerk (2.8.2)
903+
zeitwerk (2.8.3)
904904

905905
PLATFORMS
906906
arm64-darwin
@@ -1037,8 +1037,5 @@ DEPENDENCIES
10371037
view_component
10381038
webmock
10391039

1040-
RUBY VERSION
1041-
ruby 4.0.5
1042-
10431040
BUNDLED WITH
10441041
4.0.15

0 commit comments

Comments
 (0)