Repository navigation
Phase 4: previews, development inbox, generators, allowlist - #4
Merged
Merged
Conversation
Smswire::Preview and a previews page that renders each message in a phone frame with encoding, segment count, remaining characters, and the characters that force UCS-2. A development inbox lists deliveries and inbound messages and simulates replies through the shared inbound handler. Both are enabled with config.smswire.show_previews and show_inbox, default to development only, and register preview paths for autoloading the way Action Mailer does. Generators for install (migrations, initializer, ApplicationMessenger, engine mount), messengers (class, templates, preview, test), and provider adapters. An allowlist interceptor suppresses or redirects messages to unlisted numbers for staging. The dummy app now uses a file-backed SQLite database, since an in-memory one is lost when a second connection opens, and every test class resets the Smswire tables before running. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5SuBiSMN4r9qr5CXbKkHV
This was referenced Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements Phase 4 of
docs/SPEC.md. Stacked on #3 (then #2 and #1). Merge in order.What's included
Smswire::Previewclasses intest/messengers/previewsorspec/messengers/previews, served at<mount>/previews. Each message renders in a phone frame with sender, category, provider, encoding, segment count, and units remaining in the current segment. A warning names any characters that force UCS-2. Previews build the message without running interceptors or sending, and there's a raw-text view.<mount>/inboxlists recent deliveries and inbound messages, with status, segments, and errors. A form simulates a reply such as STOP through the same handler the webhook uses, so the full opt-out loop can be tested locally.smswire:installcopies migrations idempotently, writes a commented initializer andApplicationMessenger, and mounts the engine.smswire:messenger Order shipped deliveredwrites the class, one template per action, a preview, and a test.smswire:provider Acmewrites an adapter skeleton inapp/sms_providers, a WebMock test, and a registration line.redirect_to:, reroutes them to one phone with the original recipient prefixed to the body.Notes
config.smswire.show_previewsandconfig.smswire.show_inbox, both on in development only. As in Action Mailer, preview paths are registered for autoloading before Rails builds autoload paths, so these settings belong inconfig/application.rbor an environment file, notconfig/initializers.Verification
🤖 Generated with Claude Code
https://claude.ai/code/session_01L5SuBiSMN4r9qr5CXbKkHV