Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,19 @@ RAILS_ENV=test bin/rails app:db:migrate # one-time, after adding a migration
After this, `schema.rb` is updated and subsequent runs of
`db:schema:load` will pick up the new tables. Commit `schema.rb`
alongside the migration file.

### Troubleshooting `ActiveRecord::DatabaseAlreadyExists`

If `bin/rails test` (or `db:test:prepare`) fails with
`ActiveRecord::DatabaseAlreadyExists` in `SQLiteDatabaseTasks#purge`, there
are stray sqlite files in the **engine-root** `storage/`. The dummy's
databases live in `test/dummy/storage/`; `purge` drops the file relative to
the app root but then `create` checks `File.exist?` relative to the current
directory, so a leftover `storage/*.sqlite3` in the engine root makes it
think the database already exists. This happens after running a db task from
the wrong place. Clear the strays and reset:

```bash
rm -f storage/*.sqlite3*
RAILS_ENV=test bin/rails db:drop db:create db:schema:load
```
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ PATH
frozen_record
geared_pagination
importmap-rails
local_time
mission_control-jobs
omniauth
omniauth-rails_csrf_protection
Expand Down Expand Up @@ -189,6 +190,7 @@ GEM
faraday-follow_redirects
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
local_time (3.0.3)
logger (1.7.0)
loofah (2.25.1)
crass (~> 1.0.2)
Expand Down Expand Up @@ -688,6 +690,7 @@ CHECKSUMS
json-jwt (1.17.0) sha256=6ff99026b4c54281a9431179f76ceb81faa14772d710ef6169785199caadc4cc
language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
local_time (3.0.3) sha256=c69a8974d993fdf6e60db02977ed23c070f203dcb3a1ff0de52ad3d2393f8303
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
loofah (2.25.1) sha256=d436c73dbd0c1147b16c4a41db097942d217303e1f7728704b37e4df9f6d2e04
mail (2.9.0) sha256=6fa6673ecd71c60c2d996260f9ee3dd387d4673b8169b502134659ece6d34941
Expand Down
19 changes: 19 additions & 0 deletions app/assets/stylesheets/upright/flash.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@layer components {
.flash {
border-radius: 0.5rem;
color: var(--color-ink);
font-size: var(--text-small);
margin-block-end: var(--block-space);
padding: 0.75rem 1rem;
}

.flash--notice {
background: color-mix(in oklab, var(--color-positive) 12%, var(--color-canvas));
border: 1px solid color-mix(in oklab, var(--color-positive) 40%, var(--color-canvas));
}

.flash--alert {
background: color-mix(in oklab, var(--color-negative) 12%, var(--color-canvas));
border: 1px solid color-mix(in oklab, var(--color-negative) 40%, var(--color-canvas));
}
}
Loading