Skip to content

fix(dashboard): plural counts, secret field styling, warn notes and guardrail docs - #958

Open
SantiagoDePolonia wants to merge 3 commits into
mainfrom
fix/dashboard-and-guardrail-docs
Open

fix(dashboard): plural counts, secret field styling, warn notes and guardrail docs#958
SantiagoDePolonia wants to merge 3 commits into
mainfrom
fix/dashboard-and-guardrail-docs

Conversation

@SantiagoDePolonia

Copy link
Copy Markdown
Contributor

Dashboard cosmetics and guardrail documentation gaps found in pre-release testing.

Dashboard

  • Counted strings now use the Paraglide plural selector in en/de (and pl where the noun inflects): active scopes, effective model counts, hidden inactive keys, MCP servers needing attention, stream events. No more "1 active scopes" / "1 aktive Geltungsbereiche".
  • input[type="password"] (the Presidio api_key field, any secret schema field) now gets the same styling as text/date/number inputs instead of the browser default.
  • A guardrail verdict badge in the workflow chart truncates with an ellipsis and keeps the full text in its tooltip, so a long code such as BLOCKED · STRING_REPLACE_MATCH no longer pushes the Response node out of the row.

Guardrails (string_replace)

  • A warn outcome no longer borrows the block-phrased default message: message falls back to Request blocked by policy only for block and respond, and the schema field no longer carries that default, so an instance created in the dashboard does not store it. Warn records a note only when one is configured; block/respond behaviour is unchanged.

Docs

  • guardrails.mdx: stream-phase guardrails run on streamed requests only — a Presidio restore setup needs a response-phase instance to cover non-streaming requests, otherwise clients get raw <PERSON_1> placeholders.
  • Note that LOGGING_LOG_BODIES defaults to true, so audit request_body/response_body keep the values Presidio hides from the provider (only the revision body is anonymized).
  • "Redact In Flight" example updated to sk-[A-Za-z0-9_-]{20,} (current keys contain -) with stream_lookbehind: 256, plus a note that anything past the lookbehind reaches the client unmasked.
  • Presidio tip: PERSON spans can swallow an adjacent all-caps token, so a presidio step ahead of string_replace can hide the words a later rule looks for.

Testing

  • make test-dashboard (669 pass, including new i18n plural assertions), npm run check, make lint, go test ./....
  • Live gateway with SQLite + gemini: verified the warn outcome now records no message, a stream-phase-only instance leaves non-streaming responses untouched while a response-phase one covers both, audit request_body keeps the original text while request_revisions holds the rewritten body, and sk-proj-… keys leak past a 64-character lookbehind but not at 256. Dashboard checked in a headless browser: secret field now 34px with the shared padding/border, chart badge truncated and Response node back in view.
  • internal/server TestVersionEndpointChecksOnFirstVisit/RechecksOnANewDay fail locally before and after this change: the visit cookie uses UTC while the test compares the local date, so they fail in CEST between midnight and 02:00. Untouched by this PR.

@mintlify

mintlify Bot commented Sep 11, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
gomodel 🟢 Ready View Preview Sep 12, 2026, 8:46 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 7d20ff38-3cf7-4acf-a0fe-579d29e4b44f

📥 Commits

Reviewing files that changed from the base of the PR and between 6d042df and 62871c6.

📒 Files selected for processing (11)
  • docs/advanced/guardrails.mdx
  • docs/advanced/plugins.mdx
  • internal/plugins/builtin/stringreplace/config.go
  • internal/plugins/builtin/stringreplace/plugin.go
  • internal/plugins/builtin/stringreplace/plugin_test.go
  • web/dashboard/messages/de.json
  • web/dashboard/messages/en.json
  • web/dashboard/messages/pl.json
  • web/dashboard/src/pages/workflows/WorkflowChart.svelte
  • web/dashboard/src/styles/tables.css
  • web/dashboard/tests/i18n.test.js

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@greptile-apps

greptile-apps Bot commented Sep 11, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

Safe to merge.

Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..."

Comment on lines 74 to +78
{
Key: "message", Label: "Message", Input: pluginapi.InputText, Default: DefaultMessage,
Help: "Error message for block, assistant reply for respond, and audit note for warn.",
// No Default: the dashboard would store it with the instance, so a
// warn would carry the block-phrased text as its audit note.
Key: "message", Label: "Message", Input: pluginapi.InputText,
Help: "Error message for block, assistant reply for respond, and audit note for warn. Left empty, block and respond fall back to " + DefaultMessage + " and warn records no note.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Blank guardrail messages

Removing this field default makes dashboard-created configurations persist message: "". The configuration reader treats that as an intentional value rather than applying the action-specific fallback, so a matching block guardrail returns a blank error and a matching respond guardrail returns a blank assistant response. Normalize empty block/respond messages to the documented fallback before enforcement; this must be addressed before merging.

Knowledge Base Used: Plugin runtime and integration

Artifacts

Evidence from the check

  • The executed script creates an isolated parent worktree and runs the same matching block/respond configuration with explicit empty messages on both revisions; it proves the compared runtime contract.

Command output from the check

  • Captured `go test` output from the parent revision shows block status 0 with an empty message and respond status 0 with empty response text; the prior behavior is blank.

Command output from the check

  • Captured `go test` output from the PR revision shows the same block status 0 empty message and respond status 0 empty response text; the defect remains.

View artifacts

T-Rex Ran code and verified through T-Rex

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in bd78d44: a blank message now falls back to Request blocked by policy for block and respond (so a cleared field cannot produce an empty error or an empty assistant reply), while warn keeps no note. Added a table case covering "message": """ with on_match: block`.

@SantiagoDePolonia

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@SantiagoDePolonia

Copy link
Copy Markdown
Contributor Author

@greptileai review

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Rate Limit Exceeded

@SantiagoDePolonia have exceeded the limit for the number of chat messages per hour. Please wait 24 minutes and 51 seconds before sending another message.

@SantiagoDePolonia

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Rate Limit Exceeded

@SantiagoDePolonia have exceeded the limit for the number of chat messages per hour. Please wait 10 minutes and 23 seconds before sending another message.

@SantiagoDePolonia

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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