oficina / home Public

id.*: door pills review fixes (Fable)

- Confirm it is you has one main action: Use your passkey. The recovery
  code's Sign in is the card's quiet action.
- TestDoorButtonsCarryTheDoorsHooks exempts only the buttons inside an
  estilo-signin-form or estilo-signin-forget form, not every button on a
  page that has one (mutation-checked).
- estilo re-pinned to feat/door-pills 7153f7b (quiet touch target, pressed
  state, Sent's quiet way back); re-pin to estilo main once it lands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 0b339be967ccc4ac74b9f0400ec77e36b8b598c3 parent 12d368d
4 files changed, +24 −8
  • go.mod +1 −1
  • go.sum +2 −2
  • internal/home/door_pills_test.go +20 −4
  • internal/home/templates/passkey_confirm.html +1 −1

CI passed — run details

CI log
amadan: .amadan/timeout: this job's budget is 20m0s (this runner allows up to 30m0s)
=== vet ===
CGO_ENABLED=0 go vet ./...
CGO_ENABLED=0 go vet -tags browser ./internal/home/
cd handoff && CGO_ENABLED=0 go vet ./...
cd roster && CGO_ENABLED=0 go vet ./...
cd dashboard && CGO_ENABLED=0 go vet ./...
cd connect && CGO_ENABLED=0 go vet ./...
cd teammode && CGO_ENABLED=0 go vet ./...
=== fmt ===
=== build ===
CGO_ENABLED=0 go build ./...
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build ./cmd/home ./cmd/oficina ./internal/operatorlaunch
cd handoff && CGO_ENABLED=0 go build ./...
cd roster && CGO_ENABLED=0 go build ./...
cd dashboard && CGO_ENABLED=0 go build ./...
cd connect && CGO_ENABLED=0 go build ./...
cd teammode && CGO_ENABLED=0 go build ./...
=== go-test ===
CGO_ENABLED=0 go test -count=1 ./...
?   	amadan.net/oficina/home/cmd/home	[no test files]
ok  	amadan.net/oficina/home/cmd/home-placeholder	0.709s
?   	amadan.net/oficina/home/cmd/oficina	[no test files]
ok  	amadan.net/oficina/home/internal/guardstest	0.159s
ok  	amadan.net/oficina/home/internal/home	57.415s
ok  	amadan.net/oficina/home/internal/home/directorydata	1.362s
ok  	amadan.net/oficina/home/internal/home/logtest	0.004s
ok  	amadan.net/oficina/home/internal/home/seal	0.005s
ok  	amadan.net/oficina/home/internal/home/sealtest	0.005s
ok  	amadan.net/oficina/home/internal/home/wisp	0.053s
ok  	amadan.net/oficina/home/internal/operator	6.485s
ok  	amadan.net/oficina/home/internal/operatorlaunch	4.117s
ok  	amadan.net/oficina/home/internal/provisioner	49.009s
cd handoff && CGO_ENABLED=0 go test -count=1 ./...
ok  	amadan.net/oficina/home/handoff	0.668s
ok  	amadan.net/oficina/home/handoff/seal	0.002s
cd roster && CGO_ENABLED=0 go test -count=1 ./...
ok  	amadan.net/oficina/home/roster	5.125s
cd dashboard && CGO_ENABLED=0 go test ./...
ok  	amadan.net/oficina/home/dashboard	(cached)
cd connect && CGO_ENABLED=0 go test -count=1 ./...
ok  	amadan.net/oficina/home/connect	1.424s
ok  	amadan.net/oficina/home/connect/linkstore	0.420s
cd teammode && CGO_ENABLED=0 go test -count=1 ./...
ok  	amadan.net/oficina/home/teammode	0.107s
?   	amadan.net/oficina/home/teammode/teammodetest	[no test files]
=== race ===
go test -race -count=1 ./internal/home/ ./internal/operator/ ./internal/operatorlaunch/ ./internal/home/directorydata/
ok  	amadan.net/oficina/home/internal/home	340.953s
ok  	amadan.net/oficina/home/internal/operator	82.837s
ok  	amadan.net/oficina/home/internal/operatorlaunch	22.390s
ok  	amadan.net/oficina/home/internal/home/directorydata	23.830s
ok  	amadan.net/oficina/home/internal/provisioner	398.831s
cd handoff && CGO_ENABLED=1 go test -race -count=1 ./...
ok  	amadan.net/oficina/home/handoff	12.899s
ok  	amadan.net/oficina/home/handoff/seal	1.014s
cd roster && CGO_ENABLED=1 go test -race -count=1 ./...
ok  	amadan.net/oficina/home/roster	6.960s
cd dashboard && CGO_ENABLED=1 go test -race -count=1 ./...
ok  	amadan.net/oficina/home/dashboard	1.063s
cd connect && CGO_ENABLED=1 go test -race -count=1 ./...
ok  	amadan.net/oficina/home/connect	6.289s
ok  	amadan.net/oficina/home/connect/linkstore	6.323s
cd teammode && CGO_ENABLED=1 go test -race -count=1 ./...
ok  	amadan.net/oficina/home/teammode	1.954s
?   	amadan.net/oficina/home/teammode/teammodetest	[no test files]
diff --git a/go.mod b/go.mod
index 886e114..240f8bd 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.26.0
toolchain go1.26.5
require (
- amadan.net/oficina/estilo.git v0.0.0-20261121223221-716e200fcf01
+ amadan.net/oficina/estilo.git v0.0.0-20261121231010-7153f7b05452
amadan.net/oficina/home/dashboard v0.0.0-20261024234842-3774eb68f816
amadan.net/oficina/home/handoff v0.0.0-20261120140933-17cdcaff3345
amadan.net/oficina/home/roster v0.0.0-20261028165624-d942439ac4e4
diff --git a/go.sum b/go.sum
index bda6524..f096a26 100644
--- a/go.sum
+++ b/go.sum
@@ -1,7 +1,7 @@
amadan.net/carlos/platform.git/launchctx v0.0.0-20260911135504-fb577f96f7d1 h1:RxwIRojWcVtwSdNAjtdz7y1bxHLh3GUgqT1TrXVKpyM=
amadan.net/carlos/platform.git/launchctx v0.0.0-20260911135504-fb577f96f7d1/go.mod h1:6fBmMWgtESLFXZURzu/HyRXM0vyLuo4+XGGdKuZ+wao=
-amadan.net/oficina/estilo.git v0.0.0-20261121223221-716e200fcf01 h1:Ig5kyhUVoZy3GWIpNCz/XJDZoU7Wm8BxxxC2DowAhE0=
-amadan.net/oficina/estilo.git v0.0.0-20261121223221-716e200fcf01/go.mod h1:2UFIFrbTrhew8EFM0C94WmTo2OASM2pHEgT4jzeE/s8=
+amadan.net/oficina/estilo.git v0.0.0-20261121231010-7153f7b05452 h1:zEhZxMM/9GiUa0wXWTcmTRle9bEZ/RAD+XQ37lHKvV0=
+amadan.net/oficina/estilo.git v0.0.0-20261121231010-7153f7b05452/go.mod h1:2UFIFrbTrhew8EFM0C94WmTo2OASM2pHEgT4jzeE/s8=
amadan.net/oficina/home/dashboard v0.0.0-20261024234842-3774eb68f816 h1:AFDuOio0MxNxN9ZWVc3lul1QHkNjNUCO56kXpe/Fw3I=
amadan.net/oficina/home/dashboard v0.0.0-20261024234842-3774eb68f816/go.mod h1:+7xsX+QyVFrKy5gDAGh+FZ5+75z4CibWTL0wl9DWAw0=
amadan.net/oficina/home/handoff v0.0.0-20261120140933-17cdcaff3345 h1:3fR/a8Mqiwsnhv7Cu6FFzVHVtdqRTxyl1EpXeL6IaV0=
diff --git a/internal/home/door_pills_test.go b/internal/home/door_pills_test.go
index bb973c7..c1487be 100644
--- a/internal/home/door_pills_test.go
+++ b/internal/home/door_pills_test.go
@@ -15,14 +15,15 @@ import (
// from its own hooks, never from rst-btn (estilo AGENTS.md, Vocabulary),
// so every button on a door or hop page must carry estilo-signin-action,
// with the variant that matches its rst-btn: "danger" for a danger
-// button, "quiet" for a ghost one. A button in a door sign-in form
+// button, "quiet" for a ghost one. A button inside a door sign-in form
// (estilo-signin-form) or Forget (estilo-signin-forget) is reached by
-// those hooks instead. A card whose one way forward is a link draws it as
+// that form's hook instead; one anywhere else on the page is not. A card whose one way forward is a link draws it as
// a primary button in its template; the CSS never guesses.
func TestDoorButtonsCarryTheDoorsHooks(t *testing.T) {
btn := regexp.MustCompile(`<(a|button)\b[^>]*\brst-btn\b[^>]*>`)
variant := regexp.MustCompile(`\brst-btn(?:="([^"]*)")?`)
action := regexp.MustCompile(`\bestilo-signin-action(?:="([^"]*)")?`)
+ hookedForm := regexp.MustCompile(`(?s)<form\b[^>]*\b(?:estilo-signin-form|estilo-signin-forget)\b[^>]*>.*?</form>`)
pages := map[string]bool{}
for name := range doorPages {
pages[name] = true
@@ -37,12 +38,20 @@ func TestDoorButtonsCarryTheDoorsHooks(t *testing.T) {
t.Fatal(err)
}
page := string(src)
- hooked := strings.Contains(page, "estilo-signin-form") || strings.Contains(page, "estilo-signin-forget")
- for _, tag := range btn.FindAllString(page, -1) {
+ var inHookedForm [][]int
+ for _, f := range hookedForm.FindAllStringIndex(page, -1) {
+ inHookedForm = append(inHookedForm, f)
+ }
+ for _, at := range btn.FindAllStringIndex(page, -1) {
n++
+ tag := page[at[0]:at[1]]
v := strings.Fields(variant.FindStringSubmatch(tag)[1])
m := action.FindStringSubmatch(tag)
if m == nil {
+ hooked := false
+ for _, f := range inHookedForm {
+ hooked = hooked || (f[0] < at[0] && at[1] <= f[1])
+ }
if !hooked {
t.Errorf("%s: %s has no estilo-signin-action, so the door draws it as rastrillo's plain button", name, tag)
}
@@ -63,6 +72,13 @@ func TestDoorButtonsCarryTheDoorsHooks(t *testing.T) {
if n == 0 {
t.Fatal("found no buttons on the door's pages")
}
+ // One main action per card: Use your passkey is the main action, so the
+ // recovery code's Sign in is the quiet one.
+ if src, err := os.ReadFile(filepath.Join("templates", "passkey_confirm.html")); err != nil {
+ t.Fatal(err)
+ } else if !strings.Contains(string(src), `<button type="submit" rst-btn="ghost" estilo-signin-action="quiet">Sign in</button>`) {
+ t.Error("passkey_confirm.html: the recovery code's Sign in is not the card's quiet action")
+ }
// The lone links Paul's ruling names are the card's main action.
for name, want := range map[string]string{
"handoff_failed.html": `<a rst-btn="primary" estilo-signin-action href="{{.Data.HomeURL}}">Back to Oficina</a>`,
diff --git a/internal/home/templates/passkey_confirm.html b/internal/home/templates/passkey_confirm.html
index e2343e2..77bbbd2 100644
--- a/internal/home/templates/passkey_confirm.html
+++ b/internal/home/templates/passkey_confirm.html
@@ -17,7 +17,7 @@ needs no script and no device.</p>
<input id="code" name="code" type="text" autocomplete="one-time-code" required rst-input>
</div>
<div rst-form-foot>
- <button type="submit" rst-btn="primary" estilo-signin-action>Sign in</button>
+ <button type="submit" rst-btn="ghost" estilo-signin-action="quiet">Sign in</button>
</div>
</form>
{{end}}