Repository navigation
Session replay from pocket-kit v0.3.0, with typed text masked - #380
Merged
Merged
Conversation
Pins pocket-kit to the v0.3.0 tag, turns config.replay.enabled on, puts pocket_kit_replay_tag beside the errors tag in the one layout that has it, and marks every echo of a typed line rr-mask so it is not recorded in clear.
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.
Adds pocket-kit v0.3.0's opt-in session replay, following calebl/draft-web#110.
tag: "v0.3.0"(was commitd7c0fd7). No config changes were needed for the 0.1→0.3 jump; error reporting and feedback tests pass unchanged. Propshaft serves the vendored rrweb assets, so no manifest change (Draft's was Sprockets).config.replay.enabled = true;show_typed_textleft at its defaultfalse.pocket_kit_replay_tagbesidepocket_kit_errors_taginapp/views/layouts/application.html.erb, the only layout with the errors tag. The tag renders only when feedback or page errors can send, so with neither command set nothing is recorded.maskAllInputs(inputs, textareas, selects, including the command line and the feedback note) and maskscontenteditable. The page also echoes the typed line back as text (.commandin the turn log, the refusal, the in-flight receipt, and the saved-turn notice), so those now carryrr-mask. Narration that restates the player's action is game prose and is recorded as shown.PocketKitErrorsTestchecks the replay meta tag hasdata-show-typed-text=false, that an echoed typed line isrr-mask, and that there is no replay tag when no command is set.Known limits
Checks:
bin/rails test(5503 runs, 0 failures), rubocop, zeitwerk, brakeman all clean. No model calls were made.