Repository navigation
feat(view): readable approval view with channel labels, mention kinds and embeds as text - #52
Merged
Merged
Conversation
The held-request view page shows the message as text: an optional [passthrough].channel_labels label next to the channel id from the path, mentions marked in place (user/role/channel, @everyone/@here warning, no lookup), embed title/description/fields as inert escaped text, bounded with a truncated marker, raw JSON in Details unchanged. Telegram push, auth, CSP, hold and approval behaviour are unchanged. Verified on macmini (arm64), clone $HOME/work/auth-proxy-view-render (rsync of the worktree, umask 022): - cargo fmt --all -- --check: exit 0 - cargo clippy --workspace --all-targets -- -D warnings: exit 0 - cargo test --workspace: exit 0, no failures (no pre-existing reds seen, so none needed a base comparison)
- labels: explicit safe character set (letters, digits, space, - _ . , : # + / ( ) @); refuses control, format (bidi, zero-width), U+2028/2029, quotes, < > & - labels are read from the policy in force at each page render, so a label-only reload shows on pending holds - extra-fields banner lists at most 16 names of at most 64 chars, with a 'more not listed' / truncated marker - cut embeds and embed fields show an 'N more ... omitted' marker - runbook keeps only the short label note Verification: rustfmt applied on macmini (skip_children); cargo build and tests not run here, they run on macmini in the next step.
Each embed block now ends with 'not shown here: <key names>' for keys other than title, description and fields (max 8 names, 32 chars each, '+N more'; names escaped, values never shown). Tests: embed_keys_that_are_not_rendered_are_named_without_their_values, the_unshown_keys_note_is_bounded_and_escaped, an_embed_with_only_title_description_and_fields_has_no_unshown_note.
Previous commit 31cb853 failed cargo fmt --all -- --check on macmini (exit 1); formatted only.
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.
What changed
@everyone/@herecarry a warning. No lookup is performed.truncatedmarker.docs/runbooks/muse-stage2.md.What did not change
Telegram push, authentication, view token, nonce, hold, start claim, audit, notifier, polling route, approval behavior.
Tests (macmini, clean clone at 843ec9b, umask 022)
cargo fmt --all -- --check: exit 0cargo clippy --workspace --all-targets -- -D warnings: exit 0cargo test --workspace: exit 0 (all suites passed, 0 failed; no known pre-existing reds appeared)Refs #50