Sprint 11 (v1.4.0): Sites Manager — domain lokal via hosts#11
Merged
Conversation
…3, elevated write, commands) - Managed-block engine (parse/generate/diff) — hanya sentuh blok sentinel, idempoten, CRLF/LF aware. - Skema config `sites` + migrasi v2->v3 + backup hosts (rotasi 5). - Elevated write primitive: Windows RunAs (terbukti via spike), macOS osascript, Linux pkexec + fallback. - Command sites_status/apply/restore + event sites-changed. Semua Result<T,String>, guard path-traversal restore. - 82 unit test hijau. devhardiyanto
… (diff-confirm) - Composable useSites: CRUD (add/edit/delete/toggle) via useConfig persist, apply/restore/status, validasi IPv4 & domain. - Tab Settings "Sites": daftar domain (domain -> ip, toggle, edit/hapus), input tambah custom IP, indikator sinkron/drift. - Modal diff-confirm sebelum tulis hosts (UAC manual) + section restore backup. devhardiyanto
devhardiyanto
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.
What
Fitur Sites Manager: petakan domain lokal (mis.
myapp.test→127.0.0.1) dengan mengelola file hosts sistem secara aman. Tab baru di Settings → Sites.Why
Melengkapi roadmap M11/v1.4.0 — dev butuh domain lokal tanpa edit hosts manual. Fitur terberat (tulis file sistem + privilege elevation), sehingga dikawal spike gate lebih dulu.
How
# >>> servel managed block >>>; isi hosts di luar blok byte-identik. Idempoten, CRLF/LF aware.sites_apply/restorememicu UAC (WindowsStart-Process -Verb RunAs, macOSosascript, Linuxpkexec+ fallback manual). Cancel = no-op bersih.sites: Vec<Site>di config.json, migrasi v2→v3 (serde default[]). Hosts = proyeksi sites yangenabled.Keputusan owner (open question): tab Settings · custom IP (validasi IPv4) · manual apply + konfirmasi · Linux fallback manual.
Changes
commands/hosts.rs(baru) — managed-block engine, backup, elevated write, commandsites_status/apply/restore+ eventsites-changed;config.rsskemasites+ migrasi v2→v3 +load_config; register dilib.rs.useSites.ts(baru) composable CRUD + apply/restore/status + validasi; tab "Sites" diSettings.vuedengan modal diff-confirm & restore;useConfig.tsschema.Testing
vue-tschijau, build bersih.devhardiyanto