feat: [43] blueprint overview and detail pages #46

Merged
hobbypunk merged 13 commits from feature/43_blueprint_overview into main 2026-11-01 09:10:56 +00:00
Contributor

Closes #43

Summary

/app as the authenticated context:

  • /app dashboard (draft list with expiry badges)
  • /app/blueprints discover page: cards grouped by category with preview images, ransack search over name/description/category name, name/updated sort
  • /app/blueprints/:id detail page: version cards (default first, then newest), mesh download, "configure this version" CTA

Configure CTA (#25 follows later):

  • Creating a version's param set seeds a draft from the schema defaults and redirects back with a notice — no read-only stub page, the editor (#25) replaces this flow directly

Sidebar rework:

  • Model-driven entries (Icon(model:) + model_name.human) matching the admin sidebar
  • Semi-dynamic sub entries: views declare values (procs, evaluated in view context) and subs (sidebar-context markup); presence is context — no page matching needed

UI components:

  • Card: image/placeholder support, card.title usage, equal-height rows via self-stretch, named aspect-preview utility
  • SearchForm: autosubmit toggle, join-styled search_bar in the form builder
  • Transparent WebP previews (bg keyed out via ruby-vips, model colors preserved) render cleanly in both themes

Version ordering: default version first, then newest; i18n keys follow the view-path convention (incl. the first controllers.*-free flash via set_flash)

Test strategy

  • Controller tests for auth gates, visibility, search, sort, download, draft creation
  • Dev screenshot walkthrough (SCREENSHOTS=1) covering all pages in light/dark plus a 420px narrow viewport; verified against all 17 system blueprint versions
Closes #43 ## Summary **/app as the authenticated context:** - `/app` dashboard (draft list with expiry badges) - `/app/blueprints` discover page: cards grouped by category with preview images, ransack search over name/description/category name, name/updated sort - `/app/blueprints/:id` detail page: version cards (default first, then newest), mesh download, "configure this version" CTA **Configure CTA (#25 follows later):** - Creating a version's param set seeds a draft from the schema defaults and redirects back with a notice — no read-only stub page, the editor (#25) replaces this flow directly **Sidebar rework:** - Model-driven entries (`Icon(model:)` + `model_name.human`) matching the admin sidebar - Semi-dynamic sub entries: views declare `values` (procs, evaluated in view context) and `subs` (sidebar-context markup); presence is context — no page matching needed **UI components:** - Card: image/placeholder support, `card.title` usage, equal-height rows via `self-stretch`, named `aspect-preview` utility - SearchForm: `autosubmit` toggle, join-styled `search_bar` in the form builder - Transparent WebP previews (bg keyed out via ruby-vips, model colors preserved) render cleanly in both themes **Version ordering:** default version first, then newest; i18n keys follow the view-path convention (incl. the first `controllers.*`-free flash via `set_flash`) ## Test strategy - Controller tests for auth gates, visibility, search, sort, download, draft creation - Dev screenshot walkthrough (`SCREENSHOTS=1`) covering all pages in light/dark plus a 420px narrow viewport; verified against all 17 system blueprint versions
- /app as the authenticated context: dashboard (drafts), blueprint
  discover page (ransack search over name/description/category, sort)
  and blueprint detail with version cards
- configure CTA seeds a draft param set from the schema defaults;
  the editor itself follows in #25, so create redirects back with a
  notice and no read-only stub page
- version download streams the default mesh attachment
- versions ordered: default first, then newest
- sidebar: model-driven entries (model_name + model_icon) and
  semi-dynamic sub entries — views declare values (procs, evaluated in
  view context) and subs (sidebar-context markup); presence is context,
  no page matching needed
- card: image/placeholder support, title usage, equal-height rows via
  self-stretch; search form: autosubmit toggle and join-styled
  search_bar in the form builder
- dev screenshot walkthrough (SCREENSHOTS=1) incl. narrow viewport

---------

Co-Authored-By: opencode (Mistral GLM) <opencode-agent[bot]@hoppe-dev.eu>
The app's flash infrastructure (Flashable) renders {title, message,
debug} hashes and keys flashes under helpers.flash.<controller_path>.
A raw t() notice was both the wrong mechanism and the wrong scope.
Two parts: general rails-base_app patterns (flash via set_flash,
model-driven UI, i18n rules, layout grid) as an upstream candidate and
Blåkopi-specific decisions (naming, actors vs jobs, render pipeline,
SQLite gotchas, testing). Includes the maintenance rule: new
conventions get documented immediately.

---------

Co-Authored-By: opencode (Mistral GLM) <opencode-agent[bot]@hoppe-dev.eu>
feat: transparent webp previews
Some checks failed
PR Triage / Triage pull request-1 (pull_request) Successful in 11s
PR Triage / Triage pull request (pull_request) Successful in 0s
CI / Tests / Unit (pull_request) Failing after 2m0s
CI / Quality / Bundler Audit (pull_request) Successful in 2m8s
CI / Quality / RuboCop (pull_request) Successful in 2m15s
CI / Tests / System (pull_request) Failing after 2m20s
CI / Quality / Brakeman (pull_request) Successful in 2m20s
CI / Quality (pull_request) Successful in 0s
CI / Tests / Coverage (pull_request) Has been skipped
CI / Tests (pull_request) Failing after 0s
CI / Container / Build and push (pull_request) Has been skipped
CI / Container (pull_request) Failing after 0s
CI / Deploy (pull_request) Has been skipped
70dffc7816
OpenSCAD renders keep the model's own colors; only the constant
colorscheme background is keyed out via ruby-vips and encoded as WebP
with alpha (Q=80). Recoloring was explored and deliberately rejected
(see AGENTS.md) — multicolor models carry the author's intent and the
mesh viewer can't match them anyway. Card preview aspect moves to a
named aspect-preview utility.

---------

Co-Authored-By: opencode (Mistral GLM) <opencode-agent[bot]@hoppe-dev.eu>
forgejo-actions changed title from [43] blueprint overview and detail pages to feat: [43] blueprint overview and detail pages 2026-11-01 01:03:19 +00:00
feat: show own configuration count on blueprint cards
Some checks failed
PR Triage / Triage pull request-1 (pull_request) Successful in 43s
PR Triage / Triage pull request (pull_request) Successful in 0s
CI / Quality / Brakeman (pull_request) Successful in 1m17s
CI / Quality / Bundler Audit (pull_request) Successful in 1m20s
CI / Tests / Unit (pull_request) Failing after 1m21s
CI / Quality / RuboCop (pull_request) Successful in 1m22s
CI / Quality (pull_request) Successful in 0s
CI / Tests / System (pull_request) Failing after 1m24s
CI / Tests / Coverage (pull_request) Has been skipped
CI / Tests (pull_request) Failing after 0s
CI / Container / Build and push (pull_request) Has been skipped
CI / Container (pull_request) Failing after 0s
CI / Deploy (pull_request) Has been skipped
4879e30e59
The index card footer now shows how many param sets the current user
created for each blueprint (drafts included), counted per blueprint in
a single grouped query. Cards without configurations keep the empty
footer with just the action arrow.
refactor: derive configuration count label from the model name
Some checks failed
PR Triage / Triage pull request-1 (pull_request) Successful in 42s
PR Triage / Triage pull request (pull_request) Successful in 0s
CI / Tests / Unit (pull_request) Failing after 1m9s
CI / Quality / Bundler Audit (pull_request) Successful in 1m13s
CI / Quality / Brakeman (pull_request) Successful in 1m16s
CI / Quality / RuboCop (pull_request) Successful in 1m16s
CI / Quality (pull_request) Successful in 0s
CI / Tests / System (pull_request) Failing after 1m17s
CI / Tests / Coverage (pull_request) Has been skipped
CI / Tests (pull_request) Failing after 0s
CI / Container / Build and push (pull_request) Has been skipped
CI / Container (pull_request) Failing after 0s
CI / Deploy (pull_request) Has been skipped
80b3f8ba02
number_to_human + Blueprint::ParamSet.model_name.human instead of a
custom i18n key — the pluralized model name already exists in
activerecord.models.

---------

Co-Authored-By: opencode (Mistral GLM) <opencode-agent[bot]@hoppe-dev.eu>
feat: show own configuration count on version cards
Some checks failed
PR Triage / Triage pull request-1 (pull_request) Successful in 18s
PR Triage / Triage pull request (pull_request) Successful in 0s
CI / Quality / Bundler Audit (pull_request) Successful in 1m17s
CI / Tests / Unit (pull_request) Failing after 1m22s
CI / Tests / System (pull_request) Failing after 1m25s
CI / Quality / Brakeman (pull_request) Successful in 1m26s
CI / Quality / RuboCop (pull_request) Successful in 1m26s
CI / Tests / Coverage (pull_request) Has been skipped
CI / Tests (pull_request) Failing after 0s
CI / Quality (pull_request) Successful in 0s
CI / Container / Build and push (pull_request) Has been skipped
CI / Container (pull_request) Failing after 0s
CI / Deploy (pull_request) Has been skipped
63961c883e
Same grouped per-version count as the index cards; the footer only
renders once the user has configurations and self-stretch keeps the
rows even.

---------

Co-Authored-By: opencode (Mistral GLM) <opencode-agent[bot]@hoppe-dev.eu>
refactor: polish version card footer and CTA
Some checks failed
PR Triage / Triage pull request-1 (pull_request) Successful in 49s
PR Triage / Triage pull request (pull_request) Successful in 0s
CI / Quality / Bundler Audit (pull_request) Successful in 1m9s
CI / Quality / Brakeman (pull_request) Successful in 1m11s
CI / Tests / Unit (pull_request) Failing after 1m12s
CI / Tests / System (pull_request) Failing after 1m14s
CI / Tests / Coverage (pull_request) Has been skipped
CI / Tests (pull_request) Failing after 0s
CI / Quality / RuboCop (pull_request) Successful in 1m18s
CI / Quality (pull_request) Successful in 0s
CI / Container / Build and push (pull_request) Has been skipped
CI / Container (pull_request) Failing after 0s
CI / Deploy (pull_request) Has been skipped
74d942fec9
---------

Co-Authored-By: opencode (Mistral GLM) <opencode-agent[bot]@hoppe-dev.eu>
fix: defer ruby-vips loading to the postprocess service
Some checks failed
PR Triage / Triage pull request-1 (pull_request) Successful in 30s
PR Triage / Triage pull request (pull_request) Successful in 0s
CI / Quality / Bundler Audit (pull_request) Successful in 1m16s
CI / Quality / RuboCop (pull_request) Successful in 1m19s
CI / Tests / Unit (pull_request) Successful in 2m3s
CI / Quality / Brakeman (pull_request) Successful in 2m22s
CI / Quality (pull_request) Successful in 0s
CI / Tests / System (pull_request) Failing after 58s
CI / Tests / Coverage (pull_request) Has been skipped
CI / Tests (pull_request) Failing after 0s
CI / Container / Build and push (pull_request) Has been skipped
CI / Container (pull_request) Failing after 0s
CI / Deploy (pull_request) Has been skipped
bb635bfa9f
Bundler's auto-require crashes on boot where libvips is absent (CI).
The gem is only needed inside PreviewPostprocess, which already
requires vips lazily.
fix: authorize param set creation with a single authorize
Some checks failed
PR Triage / Triage pull request-1 (pull_request) Successful in 25s
PR Triage / Triage pull request (pull_request) Successful in 0s
CI / Quality (pull_request) Has been cancelled
CI / Tests (pull_request) Has been cancelled
CI / Container (pull_request) Has been cancelled
CI / Deploy (pull_request) Has been cancelled
CI / Quality / Brakeman (pull_request) Has been cancelled
CI / Quality / Bundler Audit (pull_request) Has been cancelled
CI / Quality / RuboCop (pull_request) Has been cancelled
CI / Tests / Unit (pull_request) Has been cancelled
CI / Tests / System (pull_request) Has been cancelled
CI / Tests / Coverage (pull_request) Has been cancelled
CI / Container / Build and push (pull_request) Has been cancelled
e2dd374732
The controller authorized the blueprint for show and then the param
set for create — one action, one authorize. The create? policy now
implies blueprint visibility itself, and the controller builds the
draft before authorizing so the record is prepared, authorized, then
saved.

---------

Co-Authored-By: opencode (Mistral GLM) <opencode-agent[bot]@hoppe-dev.eu>
refactor: seed param set defaults in a model hook
All checks were successful
CI / Quality / Bundler Audit (pull_request) Successful in 1m28s
CI / Quality / RuboCop (pull_request) Successful in 1m32s
CI / Quality / Brakeman (pull_request) Successful in 1m32s
PR Triage / Triage pull request-1 (pull_request) Successful in 1m1s
CI / Quality (pull_request) Successful in 0s
PR Triage / Triage pull request (pull_request) Successful in 0s
CI / Tests / System (pull_request) Successful in 2m5s
CI / Tests / Unit (pull_request) Successful in 2m7s
CI / Tests / Coverage (pull_request) Successful in 28s
CI / Tests (pull_request) Successful in 0s
CI / Container / Build and push (pull_request) Successful in 5s
CI / Container (pull_request) Successful in 0s
CI / Deploy (pull_request) Has been skipped
fe9bf420e1
The before_validation hook pulls the version's default values into
new records, so the controller builds an empty draft and authorize
wraps the build expression directly.

---------

Co-Authored-By: opencode (Mistral GLM) <opencode-agent[bot]@hoppe-dev.eu>

📊 Coverage

Metrik Abdeckung
Zeilen 97.64% (3222/3300)
Branches 82.27% (803/976)
Methoden 98.65% (512/519)

Patch-Coverage: 91.1% (215/236 geänderte Zeilen)

Geänderte Dateien (schwach zuerst)

Datei Patch-Coverage Fehlende Zeilen
app/controllers/app/param_sets_controller.rb 80.0% (8/10) 12-13
app/models/blueprint/category.rb 80.0% (4/5) 12
app/views/app/blueprints/show.rb 82.22% (37/45) 43-45, 64, 69, 74-76
app/views/app/blueprints/index.rb 85.0% (34/40) 18, 51-54, 76
app/models/blueprint.rb 87.5% (7/8) 18
app/components/card.rb 90.0% (9/10) 38
app/views/app/show.rb 92.59% (25/27) 22-23
app/controllers/app/blueprints_controller.rb 100.0% (13/13)
app/components/layout/sidebar.rb 100.0% (11/11)
app/components/search_form.rb 100.0% (11/11)

Schwächste Dateien im Projekt

Datei Abdeckung
app/components/form/select.rb 72.41%
app/controllers/app/param_sets_controller.rb 80.0%
app/components/layout/notification.rb 80.95%
app/views/app/blueprints/show.rb 82.22%
app/views/app/blueprints/index.rb 85.0%
app/components/concerns/actionable.rb 86.67%
app/models/blueprint/category.rb 87.5%
app/components/users/avatar.rb 89.47%
app/components/concerns/inferrable.rb 90.63%
app/models/concerns/has_uuid_v7.rb 90.91%

🔍 Report im Browser ansehen · 📄 Run-Artifact „coverage-report“

<!-- coverage-report --> ## 📊 Coverage | Metrik | Abdeckung | |---|---| | Zeilen | 97.64% (3222/3300) | | Branches | 82.27% (803/976) | | Methoden | 98.65% (512/519) | **Patch-Coverage**: 91.1% (215/236 geänderte Zeilen) **Geänderte Dateien (schwach zuerst)** | Datei | Patch-Coverage | Fehlende Zeilen | |---|---|---| | app/controllers/app/param_sets_controller.rb | 80.0% (8/10) | 12-13 | | app/models/blueprint/category.rb | 80.0% (4/5) | 12 | | app/views/app/blueprints/show.rb | 82.22% (37/45) | 43-45, 64, 69, 74-76 | | app/views/app/blueprints/index.rb | 85.0% (34/40) | 18, 51-54, 76 | | app/models/blueprint.rb | 87.5% (7/8) | 18 | | app/components/card.rb | 90.0% (9/10) | 38 | | app/views/app/show.rb | 92.59% (25/27) | 22-23 | | app/controllers/app/blueprints_controller.rb | 100.0% (13/13) | | | app/components/layout/sidebar.rb | 100.0% (11/11) | | | app/components/search_form.rb | 100.0% (11/11) | | **Schwächste Dateien im Projekt** | Datei | Abdeckung | |---|---| | app/components/form/select.rb | 72.41% | | app/controllers/app/param_sets_controller.rb | 80.0% | | app/components/layout/notification.rb | 80.95% | | app/views/app/blueprints/show.rb | 82.22% | | app/views/app/blueprints/index.rb | 85.0% | | app/components/concerns/actionable.rb | 86.67% | | app/models/blueprint/category.rb | 87.5% | | app/components/users/avatar.rb | 89.47% | | app/components/concerns/inferrable.rb | 90.63% | | app/models/concerns/has_uuid_v7.rb | 90.91% | [🔍 Report im Browser ansehen](https://pages.hoppe-dev.eu/hobbypunk-blakopi/pr-46/coverage) · [📄 Run-Artifact „coverage-report“](https://code.hoppe-dev.eu/hobbypunk/blakopi/actions/runs/3802/artifacts/coverage-report)
refactor: return with error flash instead of save!
All checks were successful
PR Triage / Triage pull request-1 (pull_request) Successful in 26s
PR Triage / Triage pull request (pull_request) Successful in 0s
CI / Quality / Brakeman (pull_request) Successful in 1m39s
CI / Quality / RuboCop (pull_request) Successful in 1m42s
CI / Quality / Bundler Audit (pull_request) Successful in 1m43s
CI / Quality (pull_request) Successful in 0s
CI / Tests / Unit (pull_request) Successful in 2m15s
CI / Tests / System (pull_request) Successful in 2m20s
CI / Tests / Coverage (pull_request) Successful in 45s
CI / Tests (pull_request) Successful in 0s
CI / Container / Build and push (pull_request) Successful in 14s
CI / Container (pull_request) Successful in 0s
CI / Deploy (pull_request) Has been skipped
f2f43b1dce
Failed saves surface as a flash with the model's errors rather than a
500; the success flash passes the model too. Documented the one
authorize per action and no-bang-saves conventions in AGENTS.md.

---------

Co-Authored-By: opencode (Mistral GLM) <opencode-agent[bot]@hoppe-dev.eu>
Sign in to join this conversation.
No description provided.