[ENHANCEMENT] Add HTTP header forwarding policy fields + upgrade TypeScript to v7 + upgrade RHF and Zod - #279
Merged
Conversation
- Add allowed and dropped header editors with validation - Upgrade Zod, React Hook Form, TypeScript, and Perses spec dependencies Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
- Replace deprecated z.Schema and z.ZodSchema annotations with z.ZodType - Update validation provider schema state and form resolver types Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
- Upgrade @perses-dev/spec dependencies to beta.7 Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Gladorme
force-pushed
the
t3code/add-http-settings-fields
branch
2 times, most recently
from
September 7, 2026 14:00
87916a0 to
a9854a2
Compare
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Gladorme
force-pushed
the
t3code/add-http-settings-fields
branch
from
September 7, 2026 14:04
a9854a2 to
73945a2
Compare
Gladorme
marked this pull request as ready for review
September 7, 2026 14:04
Nexucis
approved these changes
Sep 7, 2026
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The runtime advertises beta.5 while beta.7 is installed, potentially breaking federation sharing.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds HTTP header-forwarding policy controls and upgrades TypeScript, Zod, React Hook Form, and Perses spec dependencies.
Changes:
- Adds mutually exclusive allow/drop header editors.
- Migrates schemas and validation to Zod 4.
- Updates dependencies and TypeScript 7 compatibility.
File summaries
| File | Description |
|---|---|
plugin-system/src/schema/panel.ts |
Updates Zod schema typings. |
plugin-system/src/remote/PluginRuntime.tsx |
Updates shared dependencies; advertised spec version remains inconsistent. |
plugin-system/src/context/ValidationProvider.tsx |
Migrates validation types to Zod 4. |
plugin-system/src/components/HTTPSettingsEditor/HTTPSettingsEditor.tsx |
Integrates header-policy controls; focused tests are requested. |
plugin-system/src/components/HTTPSettingsEditor/HTTPHeaderPolicyEditor.tsx |
Implements allow/drop controls; interaction tests are requested. |
plugin-system/package.json |
Upgrades spec, Zod, and form dependencies. |
package.json |
Upgrades TypeScript. |
package-lock.json |
Records dependency resolution updates. |
dashboards/package.json |
Aligns form and spec dependencies. |
components/src/TimeRangeSelector/TimeRangeSelector.tsx |
Simplifies autocomplete value typing. |
components/src/theme/types/fonts.d.ts |
Declares font CSS modules. |
components/package.json |
Updates the Perses spec dependency. |
client/src/schema/user.ts |
Updates user schema typings. |
client/src/schema/rolebinding.ts |
Updates role-binding schema typings. |
client/src/schema/role.ts |
Updates role schema typings. |
client/src/schema/datasource.ts |
Updates datasource schema typings. |
client/package.json |
Upgrades Zod and Perses spec. |
Review details
Suppressed comments (2)
plugin-system/src/components/HTTPSettingsEditor/HTTPHeaderPolicyEditor.tsx:74
- The new header-policy behavior is untested even though this editor already has comprehensive interaction tests. Please add focused cases for adding/removing both policy lists and for the mutual-exclusion/read-only behavior so regressions in the controlled
Autocompletestate are caught.
const hasConflict = Boolean(value.allowHeaders?.length && value.dropHeaders?.length);
const handleChange = useCallback(
(_: unknown, headers: string[]): void => {
const nextHeaders = headers.map((header) => header.trim()).filter(Boolean);
onChange({ ...value, [name]: nextHeaders.length > 0 ? nextHeaders : undefined });
plugin-system/src/components/HTTPSettingsEditor/HTTPSettingsEditor.tsx:415
- The new public header-policy behavior has no focused tests, although
HTTPSettingsEditor.test.tsxextensively covers the existing request-header editor. Add cases that verify allow/drop values are emitted, clearing removes the field, the opposite policy is disabled, existing proxy fields are preserved, and readonly mode prevents edits.
{value.proxy && (
<HTTPHeaderPolicyEditor
value={value.proxy.spec}
isReadonly={isReadonly}
onChange={handleHeaderPolicyChange}
/>
- Files reviewed: 15/17 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
6 tasks
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.
Description
Adding editor for adding or removing header in datasource.
Aligning lib deps with perses/spec :
Screenshots
Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes
See e2e docs for more details. Common issues include: