Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
## Fixes

- Headplane's agent and Browser SSH are now built with Go 1.27.3, which stops trusting a small set of intermediate certificates from a compromised certificate authority. The `ip-address` dependency is also updated to fix a denial of service from very long addresses.
- Search and replace in the Access Control file editor stays open while editing. Previously the search panel closed after the first replacement, after typing in the editor, or whenever the page refreshed its data in the background (closes [#698](https://github.com/tale/headplane/issues/698)).
- Saving from the Rules or Tags & Groups tabs no longer drops the comma from text like `,}` or `,]` inside a policy value.
- Live updates work again right after signing in. Previously the machines list and other pages only refreshed on their own after a full page reload.
- Changes to DNS settings and sign-in restrictions now actually apply with the `proc` and `kubernetes` integrations. Both sent `SIGHUP`, which only makes Headscale reload its ACL policy. They now stop Headscale with `SIGTERM` and wait for systemd or Kubernetes to restart it, so Headscale needs a supervisor that restarts it.
Expand Down
8 changes: 6 additions & 2 deletions app/routes/acls/components/cm.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ export function Editor(props: EditorProps) {
</div>
<CodeMirror
editable={!props.isDisabled}
extensions={[shopify.jsonc(), policyLinter, lintGutter()]}
extensions={editorExtensions}
minHeight="24rem"
maxHeight="var(--height-editor)"
onChange={(value) => props.onChange(value)}
onChange={props.onChange}
readOnly={props.isDisabled}
theme={headplaneTheme}
value={props.value}
Expand All @@ -80,6 +80,10 @@ const policyLinter = linter((view): Diagnostic[] => {
}));
});

// Keep extensions and onChange stable: when either changes identity,
// react-codemirror reconfigures the editor and drops the search panel.
const editorExtensions = [shopify.jsonc(), policyLinter, lintGutter()];

interface DifferProps {
left: string;
right: string;
Expand Down
Loading