Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
frontend ruleP2universalStack: javascript
url-statequery-paramsmessagingdesign
Signal cross-page events with a flag, not a full message in the URL
To notify another page of an event, pass a boolean/flag query param and resolve the user-facing copy at the destination instead of encoding the whole message in the URL.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codetypescript
| 1 | window.location.href = `/thread/${id}?message=Your%20thread%20was%20successfully%20posted.`; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | window.location.href = `/thread/${id}?create-thread-success=true`; |
| 2 | // destination resolves the copy from the flag |
Explanation (EN)
Objašnjenje (HR)