Skip to content

feat: cache entry detail page#26

Merged
eclectic-coding merged 4 commits into
mainfrom
feat/cache-entry-detail
May 26, 2026
Merged

feat: cache entry detail page#26
eclectic-coding merged 4 commits into
mainfrom
feat/cache-entry-detail

Conversation

@eclectic-coding
Copy link
Copy Markdown
Owner

Summary

  • Adds GET /cache/entries/:id — shows full key, byte size, created-at, and optionally the raw serialized value
  • SolidStackWeb.allow_value_preview config toggle (default false) gates the value section; when enabled, displays up to 4 KB with JSON pretty-printing and a format badge (JSON / Text)
  • Entry key in the browser table is now a link to the detail page
  • Delete button on the detail page redirects back to the entry list
  • allow_value_preview = true set in the dummy app initializer for local testing

Test plan

  • bundle exec rake passes (219 examples, 0 failures)
  • Browse to a cache entry detail page with allow_value_preview = false — value section shows the disabled message with config hint
  • Set allow_value_preview = true in dummy app — JSON values render pretty-printed with JSON badge; plain-text values render with Text badge
  • Delete button on detail page removes the entry and redirects to /cache/entries
  • Key link in the entries table navigates to the detail page

🤖 Generated with Claude Code

eclectic-coding and others added 4 commits May 26, 2026 09:20
Shows key, byte size, and created-at for any cache entry. Value body
is gated behind SolidStackWeb.allow_value_preview (default false);
when enabled, displays up to 4 KB of the raw serialized value.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
format_cache_value helper tries JSON.parse; on success renders
JSON.pretty_generate with a JSON badge, otherwise falls back to plain
text with a Text badge. Truncation and the disabled-state message are
unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eclectic-coding eclectic-coding merged commit 363aea0 into main May 26, 2026
5 checks passed
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 99.00%. Comparing base (0840f2b) to head (057a708).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
app/helpers/solid_stack_web/application_helper.rb 80.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
- Coverage   99.19%   99.00%   -0.19%     
==========================================
  Files          30       30              
  Lines         496      505       +9     
==========================================
+ Hits          492      500       +8     
- Misses          4        5       +1     
Files with missing lines Coverage Δ
...ollers/solid_stack_web/cache_entries_controller.rb 100.00% <100.00%> (ø)
lib/solid_stack_web.rb 100.00% <100.00%> (ø)
app/helpers/solid_stack_web/application_helper.rb 97.87% <80.00%> (-2.13%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eclectic-coding eclectic-coding deleted the feat/cache-entry-detail branch May 26, 2026 13:27
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.

2 participants