Phase 2: grants, node attributes, and policy settings UX#15
Open
CJFWeatherhead wants to merge 2 commits into
Open
Phase 2: grants, node attributes, and policy settings UX#15CJFWeatherhead wants to merge 2 commits into
CJFWeatherhead wants to merge 2 commits into
Conversation
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.
Summary
Implements Phase 2 from
docs/headscale-0.29.x-agentic-workplan.mdwith scope tightly focused on:src,dst,ip,via,srcPosture,app)target,attr)randomizeClientPortThis iteration also replaces the grants capability JSON textarea with a form builder.
What changed
1) New policy tabs and editors
src/routes/acls/+page.svelte:GrantsNode AttributesPolicy Settingssrc/routes/acls/Grants.sveltesrc/routes/acls/NodeAttrs.sveltesrc/routes/acls/PolicySettings.svelte2) Grants editor (form builder)
In
src/routes/acls/Grants.svelte:src(selector chips/autocomplete)dst(selector chips/autocomplete)ip(CIDR/IP chips)srcPosture(chips)via(tag-only selectors + validation hint)tailscale.com/cap/drivesharesandaccess3) Node Attributes editor
In
src/routes/acls/NodeAttrs.svelte:nodeAttrsdrive:sharedrive:access4) Policy settings
In
src/routes/acls/PolicySettings.svelte:randomizeClientPort5) E2E and mock enhancements
e2e/policy-phase2.spec.ts:e2e/mock-api.mjsto persist policy updates in-memory for deterministic round-trip assertionsWhy this approach
Test evidence (containerised)
Executed with Docker-based workflows:
svelte-check✅ passvitest✅ pass (55/55)vite build✅ passbuild/index.html,build/settings/index.html,build/nodes/index.html,build/users/index.html,build/200.html) ✅ pass/admin/,/admin/nodes/,/admin/settings/,/admin/users/,/admin/nonexistent/) ✅ passe2e/policy-phase2.spec.ts✅ pass (2/2)Note: a full suite run previously showed one unrelated flaky failure in preauth deletion e2e, outside this change scope.
Non-goals
action: check,checkPeriod,acceptEnv) — Phase 3Risks / limitations
viaenforcement is a client-side guardrail; server remains the source of truth.Follow-up recommendations