oficina / equipo Public

Add native Projects, project requests and placement card controls

Co-Authored-By: Codex GPT-6-Astra <noreply@openai.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 0277df46e7735d5daf02e40fd3a04ba174c58aea parent 1d08f03
28 files changed, +1,806 −38
  • docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md +2 −0
  • internal/equipo/copy.go +2 −0
  • internal/plan3test/plan3_release_test.go +2 −1
  • native/PROJECTS-REPORT.md +179 −0
  • native/apple/Sources/EquipoActivity/Resources/Localizable.xcstrings +264 −0
  • native/apple/Sources/EquipoKit/API/Client.swift +7 −4
  • native/apple/Sources/EquipoKit/API/Projects.swift +43 −0
  • native/apple/Sources/EquipoKit/API/Thin.swift +11 −0
  • native/apple/Sources/EquipoKit/Presentation/Roster.swift +8 −3
  • native/apple/Sources/EquipoKit/Projects/ProjectCatalog.swift +140 −0
  • native/apple/Sources/EquipoKit/Push/PushRoute.swift +1 −1
  • native/apple/Sources/EquipoKit/Resources/Localizable.xcstrings +264 −0
  • native/apple/Sources/EquipoKit/Session/EquipoSession.swift +38 −14
  • native/apple/Sources/EquipoKit/UI/LiveCards.swift +27 −5
  • native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift +10 −3
  • native/apple/Sources/EquipoKit/UI/Screens/PhoneRoot.swift +20 −0
  • native/apple/Sources/EquipoKit/UI/Screens/ProjectsScreen.swift +150 −0
  • native/apple/Sources/EquipoMac/LiveTranscript.swift +47 −4
  • native/apple/Sources/EquipoMac/MacMainView.swift +15 −0
  • native/apple/Tests/EquipoKitTests/Fixtures/project-card.json +16 −0
  • native/apple/Tests/EquipoKitTests/Fixtures/project-invalid.json +5 −0
  • native/apple/Tests/EquipoKitTests/Fixtures/project-list.json +124 −0
  • native/apple/Tests/EquipoKitTests/Fixtures/project-typed-answer.json +41 −0
  • native/apple/Tests/EquipoKitTests/MarkdownStreamTests.swift +4 −1
  • native/apple/Tests/EquipoKitTests/ProjectsTests.swift +359 −0
  • native/scripts/check-fixtures.py +1 −0
  • native/scripts/check-parity.py +2 −2
  • native/scripts/strings.json +24 −0

CI failed — run details

CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/native__projects: Type  Size Avail | ext4   96G   85G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   85G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.2s
ci-box: codex: fetched and verified in 4.4s
ci-box: codex-code-mode-host: fetched and verified in 1.5s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.7s
ci-box: pi: installed and verified in 7.4s
ci-box: opencode: installed and verified in 1.9s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.9s
ci-box: clone deepened in 3.6s
ci-box: file times set from content: 2922 files, 191 directories
ci-box: ready in 17.6s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipotest	0.147s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  2.5s
+ go list -export -test -tags testbuild -f  ./...
  3.6s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  3.2s
rastrillo: budget size: 2 problem(s)
exit status 1
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-11 02:51:11 +0000 UTC

go run github.com/zricethezav/gitleaks/v8@v8.30.1 version
version is set by build process
=== check ===
--- shard 0 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-work: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$' ./internal/headless

receipt: test step 1m14.419s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m12.906s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m12.91s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 56.70, cpu waiting 34.06%, memory waiting 0.00%, io waiting 1.01%
--- shard 1 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-review: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$' ./internal/headless

receipt: test step 1m13.044s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m11.482s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m11.48s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 56.70, cpu waiting 33.96%, memory waiting 0.00%, io waiting 1.05%
--- shard 2 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-connections: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$' ./internal/headless

receipt: test step 1m14.47s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m12.794s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m3.79s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 4.88s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.12s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 56.70, cpu waiting 34.06%, memory waiting 0.00%, io waiting 1.01%
--- shard 3 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-mac: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$' ./internal/headless

receipt: test step 1m11.642s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m10.039s amadan.net/oficina/equipo/internal/headless
receipt: slow test 34.71s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 17.91s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 8.77s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
receipt: slow test 8.64s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
machine: 32 CPUs, load 55.37, cpu waiting 33.86%, memory waiting 0.00%, io waiting 1.08%
--- shard 4 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-guards: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless

receipt: test step 1m25.274s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m23.688s amadan.net/oficina/equipo/internal/headless
receipt: slow test 55.27s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 8.99s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 7.92s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 6.92s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 4.58s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 56.27, cpu waiting 34.65%, memory waiting 0.00%, io waiting 0.85%
--- shard 5 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-rest: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$|^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$|^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$|^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$|^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless

receipt: test step 2m38.624s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2m37.042s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m32.84s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 17.9s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 8.43s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 6.51s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
receipt: slow test 6.33s amadan.net/oficina/equipo/internal/headless TestHeadlessBatchAfterRefusedReply
machine: 32 CPUs, load 22.67, cpu waiting 12.26%, memory waiting 0.00%, io waiting 0.25%
--- shard 6 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 2m5.955s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2m4.363s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 8.01s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.73s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 4.6s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 3.61s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 2.48s amadan.net/oficina/equipo/internal/thintest TestResearchDoneFallsBack
machine: 32 CPUs, load 37.09, cpu waiting 20.70%, memory waiting 0.00%, io waiting 0.43%
--- shard 7 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest-contract: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest
--- FAIL amadan.net/oficina/equipo/internal/thintest TestContractRetryAccountActions
=== RUN   TestContractRetryAccountActions
    retry_contract_test.go:296: sign in again
--- FAIL: TestContractRetryAccountActions (0.20s)

--- FAIL amadan.net/oficina/equipo/internal/thintest (package output)
FAIL
rastrillo-budget/v1 ran 1m25.794s
FAIL	amadan.net/oficina/equipo/internal/thintest	86.025s


receipt: test step 1m27.346s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 0 cached, 0 without tests, 1 failed
receipt: slow package 1m25.794s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.11s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 5.03s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.45s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.37s amadan.net/oficina/equipo/internal/thintest TestContractPreview
receipt: slow test 2.33s amadan.net/oficina/equipo/internal/thintest TestContractPublishNameTaken
rastrillo: budget test: go test failed
exit status 1
+ go test -tags testbuild -timeout 15m -skip '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' -v -run '^TestContractRetryAccountActions$' -count=1 ./internal/thintest   (retry, once)
##############################################################################
FLAKE ./internal/thintest:TestContractRetryAccountActions thintest-contract 0277df46e7735d5daf02e40fd3a04ba174c58aea 0.20s 56.27
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 55.21, cpu waiting 34.22%, memory waiting 0.00%, io waiting 0.80%
--- shard 8 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-thin: ./internal/runner/thin
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/runner/thin
cache miss: amadan.net/oficina/equipo/internal/runner/thin: its inputs changed
budget note: internal/runner/thin took 4m40.742s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 4m54.552s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 4m40.742s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 36.99s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.93s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.81s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.48s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 6.97s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 3.19, cpu waiting 1.27%, memory waiting 0.00%, io waiting 0.02%
--- shard 9 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-bug: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 50.36s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 49.31s amadan.net/oficina/equipo/internal/runner
receipt: slow test 29.28s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 50.94, cpu waiting 29.99%, memory waiting 0.00%, io waiting 1.57%
--- shard 10 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-plans: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 57.386s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 55.373s amadan.net/oficina/equipo/internal/runner
receipt: slow test 45.31s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 39.75s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.41s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.63s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 54.47, cpu waiting 33.30%, memory waiting 0.00%, io waiting 1.37%
--- shard 11 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-rest: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$|^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 35.942s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 34.926s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.16s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.15s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.74s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 31.07, cpu waiting 19.67%, memory waiting 0.00%, io waiting 1.98%
--- shard 12 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-a started 30s late; cpu waiting 38.4%, load 23.77
test lane equipotest-a: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' ./internal/equipotest

receipt: test step 1m6.478s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m4.859s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 27.11s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 27.05s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 24.96s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 22.39s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 22.3s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfiguration
machine: 32 CPUs, load 55.27, cpu waiting 32.98%, memory waiting 0.00%, io waiting 0.72%
--- shard 13 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-e started 30s late; cpu waiting 38.4%, load 23.77
test lane equipotest-e: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[E-P]' ./internal/equipotest

receipt: test step 1m16.296s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m14.506s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 19.7s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 19.64s amadan.net/oficina/equipo/internal/equipotest TestProjectRetryAndRevision
receipt: slow test 19.62s amadan.net/oficina/equipo/internal/equipotest TestProjectKindsAndDefaultBranch
receipt: slow test 19.61s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 19.59s amadan.net/oficina/equipo/internal/equipotest TestProjectBindingUniqueness
machine: 32 CPUs, load 48.45, cpu waiting 28.37%, memory waiting 0.00%, io waiting 0.61%
--- shard 14 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-r started 30s late; cpu waiting 38.4%, load 23.77
test lane equipotest-r: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestR' ./internal/equipotest

receipt: test step 1m13.33s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m8.4s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 15.46s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.17s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10.06s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 10.04s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 6.98s amadan.net/oficina/equipo/internal/equipotest TestRosterProtectsLastOwner
machine: 32 CPUs, load 48.45, cpu waiting 29.30%, memory waiting 0.00%, io waiting 0.63%
--- shard 15 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-rest started 30s late; cpu waiting 38.4%, load 23.77
test lane equipotest-rest: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test[A-D]|^TestQ|^Test[E-P]|^TestR' ./internal/equipotest

receipt: test step 1m7.764s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m5.863s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 25.04s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 24.12s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 24.12s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 22.28s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
receipt: slow test 22.27s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedAuditRollback
machine: 32 CPUs, load 51.89, cpu waiting 32.10%, memory waiting 0.00%, io waiting 0.70%
--- shard 16 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: plan3test started 30s late; cpu waiting 38.4%, load 23.77
test lane plan3test: ./internal/plan3test
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/plan3test

receipt: test step 53.129s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 51.137s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.64s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.47s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.63s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.53s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.24s amadan.net/oficina/equipo/internal/plan3test TestPlanMigrationUpgrade
machine: 32 CPUs, load 56.27, cpu waiting 34.57%, memory waiting 0.00%, io waiting 0.88%
--- shard 17 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: rest started 30s late; cpu waiting 38.4%, load 23.77
test lane rest: ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/chatmarkdown: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/claude/realcli: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/opencode: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/checks: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/containment: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/pi: its inputs changed
budget note: internal/equipo took 46.737s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 14.738s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/idtest took 1m46.501s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 36.558s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/runner/containment took 46.486s, over the 15s its record on line 40 allows; reported only, timing fails on CI
budget note: internal/runner/provider/claude/realcli took 10.08s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 2m25.967s against a 60s target (the gate's other steps are not in this figure)
receipt: 20 packages ran, 43 cached, 18 without tests, 0 failed
receipt: slow package 1m46.501s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m2.397s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 52.25s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 47.751s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 46.737s amadan.net/oficina/equipo/internal/equipo
receipt: slow test 53.96s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 45.55s amadan.net/oficina/equipo/internal/idtest TestDoorForgetsOficinaIDForARefusedSession
receipt: slow test 44.81s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
receipt: slow test 44.57s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
receipt: slow test 43.84s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
machine: 32 CPUs, load 17.87, cpu waiting 8.79%, memory waiting 0.00%, io waiting 0.18%
--- shard 18 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-chat: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' ./internal/headless

receipt: test step 1m22.917s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m21.271s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38.27s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.84s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 9.95s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.18s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 5.71s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 56.27, cpu waiting 34.57%, memory waiting 0.00%, io waiting 0.88%
--- shard 19 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-work: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' ./internal/headless

receipt: test step 1m26.187s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m24.584s amadan.net/oficina/equipo/internal/headless
receipt: slow test 26.27s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 19.82s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 12.79s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 8.94s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 8.39s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 56.27, cpu waiting 34.37%, memory waiting 0.00%, io waiting 0.83%
--- shard 20 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-connections: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless

receipt: test step 1m39.326s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m37.786s amadan.net/oficina/equipo/internal/headless
receipt: slow test 13.34s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 13.11s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 11.67s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 11.08s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.56s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 51.89, cpu waiting 30.22%, memory waiting 0.00%, io waiting 0.65%
--- shard 21 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-rest: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-23T15:14:41.971Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-23T15:14:41.971Z level=INFO msg="startup phase done" phase=state_lock took=73µs
time=2026-11-23T15:14:41.971Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-23T15:14:41.971Z level=INFO msg="startup phase done" phase=claim_roots took=83µs
time=2026-11-23T15:14:41.971Z level=INFO msg="startup phase" phase=sweep
time=2026-11-23T15:14:42.034Z level=INFO msg="startup phase done" phase=sweep took=63.256ms
time=2026-11-23T15:14:42.036Z level=INFO msg="startup phase" phase=credentials
time=2026-11-23T15:14:42.036Z level=INFO msg="startup phase done" phase=credentials took=151µs
time=2026-11-23T15:14:42.036Z level=INFO msg="startup phase" phase=open_state
time=2026-11-23T15:14:42.112Z level=INFO msg="startup phase done" phase=open_state took=75.91ms
time=2026-11-23T15:14:42.113Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-23T15:14:42.115Z level=INFO msg=connecting host=127.0.0.1:43755 protocol=28
time=2026-11-23T15:14:42.116Z level=INFO msg=connected host=127.0.0.1:43755 took=1.005ms
time=2026-11-23T15:14:42.117Z level=INFO msg="capabilities gathering"
time=2026-11-23T15:14:42.118Z level=INFO msg="capabilities gathered" took=1.009ms tags=linux,claude,go
time=2026-11-23T15:14:42.118Z level=INFO msg="hello sent" protocol=28
time=2026-11-23T15:14:42.126Z level=INFO msg=welcome protocol=28 role=primary generation=1
    browser_copy_test.go:90: waiting for !document.querySelector('[data-copy-continue]'): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserCopyContinue (6.76s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m29.581s
FAIL	amadan.net/oficina/equipo/internal/headless	89.770s


receipt: test step 1m31.077s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 0 cached, 0 without tests, 1 failed
receipt: slow package 1m29.581s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.46s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 10.76s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 9.9s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 9.38s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.42s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' -v -run '^TestBrowserCopyContinue$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserCopyContinue browser-headless-rest 0277df46e7735d5daf02e40fd3a04ba174c58aea 6.76s 55.21
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 55.27, cpu waiting 32.98%, memory waiting 0.00%, io waiting 0.72%
--- shard 22 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-rest: ./internal/equipo
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserPreviewBlocksNavigation)$' ./internal/equipo

receipt: test step 2.067s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 640ms amadan.net/oficina/equipo/internal/equipo
receipt: slow test 640ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
browser lane browser-rest: ./internal/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor|TestBrowserSmartDoor)$' ./internal/idtest
budget note: internal/idtest took 10.105s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 11.54s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 10.105s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 7.98s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.12s amadan.net/oficina/equipo/internal/idtest TestBrowserOficinaIDDoor
browser lane browser-rest: ./internal/plan3test
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestTeamsHierarchyBrowser)$' ./internal/plan3test

receipt: test step 3.559s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2.103s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.1s amadan.net/oficina/equipo/internal/plan3test TestTeamsHierarchyBrowser
browser lane browser-rest: ./internal/thintest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAccessEmojiByline|TestBrowserAccessFinalOutcomes|TestBrowserAccessRequest|TestBrowserAccessReview|TestBrowserActivitySubjects|TestBrowserAutonomySettings|TestBrowserCoordinatorQueue|TestBrowserEmptyConversation|TestBrowserEndedNoteStaysGone|TestBrowserHousekeeping|TestBrowserInnerGallery|TestBrowserInnerScreens|TestBrowserInstantThinking|TestBrowserInstantThinkingQueued|TestBrowserMachines|TestBrowserPhoneIndex|TestBrowserPlacementQuestionAndPending|TestBrowserProjectPlacement|TestBrowserProjectsList|TestBrowserReportActionFeedback|TestBrowserReportNextSteps|TestBrowserReportThread|TestBrowserRhythm|TestBrowserRollup|TestBrowserRosterAlignment|TestBrowserRosterDecisionStates|TestBrowserRosterQuietDay|TestBrowserRosterReports|TestBrowserRosterSetAside|TestBrowserRosterSubchat|TestBrowserRosterThinking|TestBrowserRosterVisual|TestBrowserSettingsHousekeepingGroups|TestBrowserSettingsMenu|TestBrowserSettingsRail|TestBrowserSettingsSaveBar|TestBrowserSettingsShots|TestBrowserSettingsStayOnPage|TestBrowserSettingsTeams|TestBrowserShipsButtons|TestBrowserSpecialistRows|TestBrowserSpendFollowsAnswers|TestBrowserTaskRows|TestBrowserTeamPanel|TestBrowserThinkingCycles|TestBrowserThinkingLinesClear|TestBrowserThinkingSteady|TestBrowserThinkingWords|TestBrowserTokenRowEmail|TestBrowserTrackPulse|TestBrowserTrackStarCentre|TestBrowserTryAgain)$' ./internal/thintest

receipt: test step 3m27.694s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 3m25.98s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 21.81s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.37s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.04s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.52s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 8.69s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 8.14, cpu waiting 3.82%, memory waiting 0.00%, io waiting 0.07%
--- shard 23 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 23: make test-quarantine
python3 scripts/ci-test.py quarantine
quarantine: 12 tests from scripts/ci-quarantine.txt; a failure is retried once, and a pass on the retry is reported as a flake
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^A5_cancel_and_sign_out$|^TestHeadlessConnections$/^C4_claude_sign_in$|^TestHeadlessConnections$/^C5_engineering_failover$|^TestHeadlessConnections$/^C5_engineering_to_codex$|^TestHeadlessConnections$/^C5_engineering_waits$' ./internal/headless   (50s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.62s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.23s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 7.72s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 8.34s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 26.12s
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^C5_review_auth$|^TestHeadlessConnections$/^C5_review_failover$|^TestHeadlessConnections$/^C5_review_on_codex$|^TestHeadlessConnections$/^C5_review_other_family_first$' ./internal/headless   (59s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 13.54s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 19.86s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 9.80s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 13.89s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (20s)
ok ./internal/headless TestMixedVersions 18.40s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.81s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (1s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.05s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 54.43, cpu waiting 33.58%, memory waiting 0.00%, io waiting 1.32%
--- shard 24 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 24: make runner-host
python3 scripts/runner-prerequisites.py
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks

receipt: test step 11.536s against a 60s target (the gate's other steps are not in this figure)
receipt: 4 packages ran, 0 cached, 4 without tests, 0 failed
receipt: slow package 7.738s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 220ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 85ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/claude/realcli
receipt: slow test 5.45s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.78s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 410ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 220ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 90ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxToolchain
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment

receipt: test step 3.475s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 3.044s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 270ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 180ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceExitStatus
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
machine: 32 CPUs, load 11.44, cpu waiting 8.23%, memory waiting 0.00%, io waiting 2.77%
--- shard 25 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: runner-dead-references started 30s late; cpu waiting 38.4%, load 23.77
shard 25: make runner-dead-references lanes-check build vet fmt-check spacing budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2635 text files, 3206 matches, 0 failures
python3 scripts/ci-test.py check
lanes: 18 lanes and 5 browser lanes run every test once; 20-check@29
CGO_ENABLED=0 go build ./...
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /dev/null ./cmd/equipo-runner
go vet ./...
go vet -tags testbuild ./internal/runner/thin ./internal/headless
GOOS=darwin GOARCH=arm64 go vet ./cmd/equipo-runner/... ./internal/runner/... ./internal/wire/... ./internal/release/...
go tool fiesta spacing -skip tokens.css internal/equipo/static
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size
internal/equipo: 22074 source lines, over the 22054 its exemption (line 17) allows
internal/plan3test: 11896 test lines, over the 11894 its exemption (line 33) allows
rastrillo: budget size: 2 problem(s)
exit status 1
make[1]: *** [Makefile:75: budget] Error 1
machine: 32 CPUs, load 54.47, cpu waiting 32.93%, memory waiting 0.00%, io waiting 1.42%
make: *** [Makefile:113: ci-shard] Error 2

amadan: step check shard 25 of 29 failed: exit status 2
--- shard 26 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: staticcheck started 30s late; cpu waiting 38.4%, load 23.77
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 42.06, cpu waiting 24.46%, memory waiting 0.00%, io waiting 1.79%
--- shard 27 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: govulncheck started 30s late; cpu waiting 38.4%, load 23.77
shard 27: make govulncheck
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
=== Symbol Results ===

No vulnerabilities found.

Your code is affected by 0 vulnerabilities.
This scan also found 0 vulnerabilities in packages you import and 3
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
machine: 32 CPUs, load 31.07, cpu waiting 19.67%, memory waiting 0.00%, io waiting 1.98%
--- shard 28 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: gitleaks started 30s late; cpu waiting 38.4%, load 23.77
shard 28: make gitleaks
3:14PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
3:14PM INF 1109 commits scanned.
3:14PM INF scanned ~64749184 bytes (64.75 MB) in 20s
3:14PM INF no leaks found
machine: 32 CPUs, load 50.94, cpu waiting 29.99%, memory waiting 0.00%, io waiting 1.57%

amadan: job failed at step check shard 25 of 29 — its output is above, not at the tail of this log
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
index 6d34c5d6..85c47d43 100644
--- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
+++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
@@ -6839,6 +6839,8 @@ records remain unchanged.
| `api.task_ended` | This task has ended. Check its result. | Copy specialist | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23) |
| `api.task_merging` | This task is merging. Wait for it to finish. | Copy specialist | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23) |
| `api.turn_ended` | This reply has ended. | Copy specialist | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23) |
+| `projects.new_request` | New request | Copy specialist | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23) |
+| `projects.remove_selection` | Remove project | Copy specialist | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23) |
## Task 21
diff --git a/internal/equipo/copy.go b/internal/equipo/copy.go
index 62262d86..f412f76f 100644
--- a/internal/equipo/copy.go
+++ b/internal/equipo/copy.go
@@ -90,6 +90,8 @@ var pageCopy = map[string]string{
"api.turn_ended": "This reply has ended.", // COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)
"projects.amadan": "Amadan", // COPY ACCEPTED BY DELEGATION (Luna, 2026-11-22)
"projects.yours": "Your projects", // COPY ACCEPTED BY DELEGATION (Luna, 2026-11-22)
+ "projects.new_request": "New request", // COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)
+ "projects.remove_selection": "Remove project", // COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)
"projects.can_add": "Available to add", // COPY ACCEPTED BY DELEGATION (Luna, 2026-11-22)
"projects.add_reachable": "Add project", // COPY ACCEPTED BY DELEGATION (Luna, 2026-11-22)
"projects.names": "Names people use", // COPY ACCEPTED BY DELEGATION (Luna, 2026-11-22)
diff --git a/internal/plan3test/plan3_release_test.go b/internal/plan3test/plan3_release_test.go
index 87a77880..ce2a93ac 100644
--- a/internal/plan3test/plan3_release_test.go
+++ b/internal/plan3test/plan3_release_test.go
@@ -195,11 +195,12 @@ func plan3CopyInventory(t *testing.T) {
// Paul, 2026-11-20: Luna's verdicts are the agent-access copy review.
// Paul, 2026-11-22: Luna verdicts and the controller clarification are this slice's review.
acceptedAPIErrors := slices.Contains([]string{"api.repo_not_allowed", "api.card_answered", "api.card_stale", "api.confirmation_required", "api.coordinator_busy", "api.hold_bar", "api.idempotency_conflict", "api.models_not_allowed", "api.not_active", "api.not_askable", "api.not_mergeable", "api.not_retryable", "api.question_ended", "api.runner_offline", "api.task_busy", "api.task_ended", "api.task_merging", "api.turn_ended"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)")
+ acceptedNativeProjects := slices.Contains([]string{"projects.new_request", "projects.remove_selection"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)")
acceptedCardNames := slices.Contains([]string{"projects.carried_selection", "projects.remember_name", "projects.name_to_remember", "projects.use_title", "docs/api/equipo-v1.md / Projects and starting a request"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-23)")
acceptedProjects := slices.Contains([]string{"projects.amadan", "projects.yours", "projects.can_add", "projects.add_reachable", "projects.names", "projects.names_hint", "projects.details", "projects.title", "projects.description", "projects.save", "projects.context", "projects.found", "projects.selected", "projects.owner_add", "projects.selection_lost", "projects.other", "projects.name_question", "projects.personal_names", "projects.forget_name", "docs/api/equipo-v1.md / Projects and starting a request"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-22)")
acceptedAgentAccess := slices.Contains([]string{"copyAgentConfig", "copyAgentForbidden", "copyAgentNotFound", "copyAgentUnavailable", "copyAgentTooLarge", "copyAgentInvalid", "copyAgentMedia", "copyAgentUnauthenticated", "agent.equipo_projects_list", "agent.equipo_tasks_list", "agent.equipo_task_get", "agent.equipo_needs_you", "docs/api/equipo-v1.md / Delegated read-only operations"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-20)")
acceptedCopy := strings.TrimSuffix(cells[3], " |") == "COPY ACCEPTED BY DELEGATION (Copy, record-bound) sha256:"+copydesk.Hash(rows[key])
- if !acceptedAPIErrors && !acceptedInjection && !acceptedMail && !acceptedPush && !acceptedAgentAccess && !acceptedProjects && !acceptedCardNames && !acceptedAccess && !acceptedPlacementEdges && !acceptedPlacement && !acceptedReportActions && !acceptedRoster && !acceptedCopy && !strings.Contains(cells[3], "COPY REVIEW REQUIRED") && !acceptedAll && !acceptedGuide && !acceptedRound2 && !acceptedStarter && !acceptedDelegation && !approvedPublish && !approvedAssistant && !approvedJobs && !approvedOficina && !approvedFailedReplies {
+ if !acceptedAPIErrors && !acceptedNativeProjects && !acceptedInjection && !acceptedMail && !acceptedPush && !acceptedAgentAccess && !acceptedProjects && !acceptedCardNames && !acceptedAccess && !acceptedPlacementEdges && !acceptedPlacement && !acceptedReportActions && !acceptedRoster && !acceptedCopy && !strings.Contains(cells[3], "COPY REVIEW REQUIRED") && !acceptedAll && !acceptedGuide && !acceptedRound2 && !acceptedStarter && !acceptedDelegation && !approvedPublish && !approvedAssistant && !approvedJobs && !approvedOficina && !approvedFailedReplies {
t.Fatal("entry has no copy review status or applicable acceptance", key)
}
}
diff --git a/native/PROJECTS-REPORT.md b/native/PROJECTS-REPORT.md
new file mode 100644
index 00000000..be04de7c
--- /dev/null
+++ b/native/PROJECTS-REPORT.md
@@ -0,0 +1,179 @@
+# Native Projects, 2026-11-23
+
+Branch: native/projects, based on main 198ce406. Implements G11 of the approved
+GitHub connector spec using the existing device Projects API. Owner editing
+uses the engine project page's revision-bearing web form, as approved by the
+controller for this round.
+
+## What a person sees
+
+- iPhone: Projects is a fourth tab. Your projects retain server order, with a
+ star button, title, repository source and wrapping description. Tapping a row
+ pushes its details. Available to add appears only with the owner capability.
+- Mac: Projects is a sidebar item. The list stays in the middle and the chosen
+ project's details appear beside it; tasks open in the existing inspector.
+- Both show Amadan's reported connection state. Details show team names and
+ your personal names, each with Remove this name. Owners have Edit project,
+ which opens the web page containing the current revision's form.
+- New request opens Conversation with a removable project chip. Removing the
+ chip leaves an ordinary message; sending includes project_id in the retained
+ retry body. A refused send remains visible with its project, the server's
+ notice and Retry. Released selections show the server's coordinator notice
+ while the actual reply keeps streaming in a separate stable row.
+- Named placement cards show a checked Remember control and editable name.
+ Answers explicitly send the edited name or the empty string when unchecked.
+ Choose another project keeps the card open at its new revision and shows a
+ text field. A 422 stays inline and leaves that card open.
+
+## State and validation
+
+ProjectCatalog preserves server ordering, corrects optimistic stars with the
+server response and applies viewer fields by event sequence even when shared
+revisions are equal. A generation protects reads overtaken by writes/events;
+reconnect snapshots carry viewer fields too. Catalog flows retain the signed-in
+session lifetime. The native feed now reads reply_id so an intermediate project
+notice neither suppresses deltas nor shares the completed reply's identity.
+The Mac retains a placement card's hosting view and remeasures only that row.
+
+Four new API response fixtures (catalog, card, typed answer and invalid-input
+error) are checked against OpenAPI. ScriptedTransport covers routes, bodies,
+bearers, optimistic state, corrections, personal names, lifecycle, event order,
+write/read races, project request retries, explicit opt-out, typed-card revision
+changes and inline refusals. The existing streaming test now sets the actual
+server reply_id when completing its synthetic turn.
+
+Validation completed:
+
+- native/scripts/check-native.sh: passed. 184 tests in 21 suites; one existing
+ known Oficina renewal issue, permissionRefusalDuringHomeOutageKeepsTheKitSession.
+ Mac and unsigned iOS Simulator builds passed. Strings, parity, fixtures,
+ sign-in checks and the reference scan passed. Existing Markdown comparison:
+ 3,586 goldens plus 32,000 seeded inputs, zero mismatches.
+- Go: internal/equipo tests, TestPlan3ReleaseBoundaries, TestNativeFixtures,
+ vet, staticcheck v0.7.0, fmt-check and go mod tidy -diff passed.
+- A wider internal/plan3test run failed TestCoordinatorAcceptance3B/onboarding_to_plan
+ with provider_uncertain. The same isolated test fails on unchanged main
+ 198ce406 in the release checkout, recorded in go-onboarding-main.log.
+- Host layout checks cover 390 and 760 point widths and accessibility3 type.
+ The narrow standard-type capture shows the full project summary, removable
+ chip, wrapping question, checked remember control, editable name and typed
+ answer field. These are shared SwiftUI host captures, not physical-device
+ screenshots. Local captures are in ignored native/build/project-screenshots.
+
+Tests were written first. Initial failures and subsequent mutation logs are
+under ignored native/build/logs. Every mutation below failed its targeted
+regression and was restored before the gate:
+
+- owner-capability
+- server-order
+- viewer-sequence
+- stale-list
+- optimistic-star
+- star-rollback
+- personal-name-delete
+- departed-read
+- message-project
+- explicit-opt-out
+- card-revision
+- server-inline-notice
+- notice-keeps-stream
+- notice-row-identity
+- mac-card-host
+- snapshot-viewer-fields
+- snapshot-write-generation
+- project-event-decoding
+- owner-web-form
+- API copy omission
+- New HTTP error without copy
+
+## Copy
+
+Twenty genuinely new canonical strings have Luna's delegated review: the two
+Projects controls below and 18 API errors. The API copy repair is kept in its
+own commit; native/API-COPY-REVIEW.md contains the exact briefs and verdicts.
+provider_error was a tool-result code, not an HTTP copy key, and was excluded
+by correcting scan scope rather than adding an omission exception.
+
+All newly imported native entries (web %s becomes Swift %@ with parity checking):
+
+- `api.card_answered`: This card has already been answered. Check the conversation for what happened.
+- `api.card_stale`: This item has changed. Check it before trying again.
+- `api.confirmation_required`: Confirm the spending limit and check both budget amounts before continuing.
+- `api.coordinator_busy`: Your coordinator is working. Wait for its reply, then try again.
+- `api.hold_bar`: This work is on hold because of a spending limit or unconfirmed spend. Check the hold, then raise the limit or check provider spend before resuming.
+- `api.idempotency_conflict`: The latest details are different. Refresh, check them, then try again.
+- `api.invalid_input`: Check the request fields and try again.
+- `api.models_not_allowed`: Choose at least one model that this connection can use.
+- `api.not_active`: This specialist is no longer active. No action is needed.
+- `api.not_askable`: This work no longer has a session you can ask about. Ask in the main conversation.
+- `api.not_found`: This item is not available.
+- `api.not_mergeable`: This task cannot be merged now. Check its latest status.
+- `api.not_retryable`: This work cannot be retried now. Check its latest status.
+- `api.question_ended`: This question has ended. Check the result in the task.
+- `api.repo_not_allowed`: Your runner can't reach this project's repository. Make sure the repository is available, then try again.
+- `api.runner_offline`: Your runner is offline. Reconnect it, then try again.
+- `api.task_busy`: This task is still working. Wait for it to finish, then try again.
+- `api.task_ended`: This task has ended. Check its result.
+- `api.task_merging`: This task is merging. Wait for it to finish.
+- `api.turn_ended`: This reply has ended.
+- `chat.card.answer`: Answer
+- `chat.connections.connected`: %@ connected
+- `counts.unavailable`: Unavailable
+- `nav.projects`: Projects
+- `projects.add_reachable`: Add project
+- `projects.can_add`: Available to add
+- `projects.description`: Description
+- `projects.details`: Project details
+- `projects.edit`: Edit project
+- `projects.empty`: No projects yet.
+- `projects.forget_name`: Remove this name
+- `projects.name_question`: Which project should this go in? Type the project name or repository.
+- `projects.name_to_remember`: Name to remember
+- `projects.names`: Names people use
+- `projects.new_request`: New request
+- `projects.other`: Choose another project
+- `projects.personal_names`: Your names for this project
+- `projects.remember_name`: Remember '%@' for this project
+- `projects.remove_selection`: Remove project
+- `projects.selection_lost`: The selected project is no longer available. This request will continue without a project.
+- `projects.title`: Title
+- `projects.yours`: Your projects
+- `work.star.add`: Star %@
+- `work.star.remove`: Unstar %@
+
+## Luna brief for Projects controls
+
+# Copy review brief: Equipo native Projects, new strings (2026-11-23)
+
+Paul delegates copy review to you; your edits will be applied as approved copy.
+Context: Equipo's iPhone and Mac apps get a Projects screen (code repositories).
+From a project you can start a request; the message composer then shows a small
+removable "chip" naming the project, so the request goes to that project.
+
+## Strings (ids fixed, text yours)
+- `projects.new_request`: button on a project, opens the composer with that project selected. Draft: `New request`
+- `projects.remove_selection`: accessibility label of the small x on the project chip in the composer, removing the project from this message. Draft: `Remove project selection`
+
+## House rules (Paul's, binding)
+No em dashes, no exclamation marks. Plain words, short, sentence case. Say what
+it does. Don't change facts; flag what looks wrong.
+
+## Output
+1. Table: `id | current | new (or "unchanged") | why`.
+2. Flagged rows: `id | problem`.
+3. Counts.
+
+## Luna result for Projects controls
+
+| id | current | new | why |
+|---|---|---|---|
+| `projects.new_request` | New request | unchanged | Short, clear button label |
+| `projects.remove_selection` | Remove project selection | Remove project | More direct and matches the action |
+
+Flagged rows:
+
+| id | problem |
+|---|---|
+| `projects.remove_selection` | “Selection” is abstract. The action removes the project from the message, not just a selection state. |
+
+Counts: 2 reviewed, 1 changed, 1 unchanged, 1 flagged.
diff --git a/native/apple/Sources/EquipoActivity/Resources/Localizable.xcstrings b/native/apple/Sources/EquipoActivity/Resources/Localizable.xcstrings
index 5ab42241..eead16e0 100644
--- a/native/apple/Sources/EquipoActivity/Resources/Localizable.xcstrings
+++ b/native/apple/Sources/EquipoActivity/Resources/Localizable.xcstrings
@@ -442,6 +442,17 @@
}
}
},
+ "chat.card.answer": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Answer"
+ }
+ }
+ }
+ },
"chat.card.merge": {
"extractionState": "manual",
"localizations": {
@@ -607,6 +618,17 @@
}
}
},
+ "chat.connections.connected": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "%@ connected"
+ }
+ }
+ }
+ },
"chat.paste.command": {
"extractionState": "manual",
"localizations": {
@@ -816,6 +838,17 @@
}
}
},
+ "counts.unavailable": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Unavailable"
+ }
+ }
+ }
+ },
"decision.on_web": {
"extractionState": "manual",
"localizations": {
@@ -926,6 +959,17 @@
}
}
},
+ "nav.projects": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Projects"
+ }
+ }
+ }
+ },
"needs.count %lld": {
"extractionState": "manual",
"localizations": {
@@ -1300,6 +1344,204 @@
}
}
},
+ "projects.add_reachable": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Add project"
+ }
+ }
+ }
+ },
+ "projects.can_add": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Available to add"
+ }
+ }
+ }
+ },
+ "projects.description": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Description"
+ }
+ }
+ }
+ },
+ "projects.details": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Project details"
+ }
+ }
+ }
+ },
+ "projects.edit": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Edit project"
+ }
+ }
+ }
+ },
+ "projects.empty": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "No projects yet."
+ }
+ }
+ }
+ },
+ "projects.forget_name": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Remove this name"
+ }
+ }
+ }
+ },
+ "projects.name_question": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Which project should this go in? Type the project name or repository."
+ }
+ }
+ }
+ },
+ "projects.name_to_remember": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Name to remember"
+ }
+ }
+ }
+ },
+ "projects.names": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Names people use"
+ }
+ }
+ }
+ },
+ "projects.new_request": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "New request"
+ }
+ }
+ }
+ },
+ "projects.other": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Choose another project"
+ }
+ }
+ }
+ },
+ "projects.personal_names": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Your names for this project"
+ }
+ }
+ }
+ },
+ "projects.remember_name": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Remember '%@' for this project"
+ }
+ }
+ }
+ },
+ "projects.remove_selection": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Remove project"
+ }
+ }
+ }
+ },
+ "projects.selection_lost": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "The selected project is no longer available. This request will continue without a project."
+ }
+ }
+ }
+ },
+ "projects.title": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Title"
+ }
+ }
+ }
+ },
+ "projects.yours": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Your projects"
+ }
+ }
+ }
+ },
"question.answered %@": {
"extractionState": "manual",
"localizations": {
@@ -2114,6 +2356,28 @@
}
}
},
+ "work.star.add": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Star %@"
+ }
+ }
+ }
+ },
+ "work.star.remove": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Unstar %@"
+ }
+ }
+ }
+ },
"work.tl.merge_dropped": {
"extractionState": "manual",
"localizations": {
diff --git a/native/apple/Sources/EquipoKit/API/Client.swift b/native/apple/Sources/EquipoKit/API/Client.swift
index 827cda86..49d0ec0b 100644
--- a/native/apple/Sources/EquipoKit/API/Client.swift
+++ b/native/apple/Sources/EquipoKit/API/Client.swift
@@ -35,7 +35,7 @@ public struct EquipoClient: Sendable {
public func tasks() async throws -> ThinList<ThinTask> { try await get("/tasks") }
public func needsYou() async throws -> ThinList<ThinTask> { try await get("/needs-you") }
public func task(_ id: String) async throws -> ThinTask { try await get("/tasks/\(escape(id))") }
- public func projects() async throws -> ThinList<ThinProject> { try await get("/projects") }
+ public func projects() async throws -> ProjectList { try await get("/projects") }
public func devices() async throws -> Page<Device> { try await get("/auth/devices") }
/// The conversation's events after `cursor`, as Server-Sent Event lines.
@@ -46,9 +46,11 @@ public struct EquipoClient: Sendable {
// MARK: Writes. Each takes a PendingWrite so a retry is the same request.
/// A message; the engine takes its key in the body as well as the header.
- public static func message(_ text: String) throws -> PendingWrite {
+ public static func message(_ text: String, projectID: String? = nil) throws -> PendingWrite {
let key = UUID().uuidString.lowercased()
- return PendingWrite(body: try EquipoJSON.encoder.encode(["text": text, "idempotency_key": key]), key: key)
+ var body = ["text": text, "idempotency_key": key]
+ if let projectID { body["project_id"] = projectID }
+ return PendingWrite(body: try EquipoJSON.encoder.encode(body), key: key)
}
public func send(_ write: PendingWrite) async throws -> Sent { try await post("/messages", write) }
public func postThread(task taskID: String, _ write: PendingWrite) async throws -> ThreadEntry {
@@ -56,9 +58,10 @@ public struct EquipoClient: Sendable {
}
/// An answer to a card, bound to the card revision the person saw.
- public static func answer(_ choice: String, note: String? = nil, to card: ThinCard) throws -> PendingWrite {
+ public static func answer(_ choice: String, note: String? = nil, rememberName: String? = nil, to card: ThinCard) throws -> PendingWrite {
var body: [String: AnyEncodable] = ["choice": .init(choice), "revision": .init(card.revision)]
if let note, !note.isEmpty { body["note"] = .init(note) }
+ if let rememberName { body["remember_name"] = .init(rememberName) }
return PendingWrite(body: try EquipoJSON.encoder.encode(body), ifMatch: card.revision)
}
public func answer(card id: String, _ write: PendingWrite) async throws -> Answered {
diff --git a/native/apple/Sources/EquipoKit/API/Projects.swift b/native/apple/Sources/EquipoKit/API/Projects.swift
new file mode 100644
index 00000000..c07029bb
--- /dev/null
+++ b/native/apple/Sources/EquipoKit/API/Projects.swift
@@ -0,0 +1,43 @@
+import Foundation
+
+public struct ProjectList: Codable, Sendable {
+ public var items: [ThinProject]?
+ public var connections: [ProjectConnection]?
+ public var canAdd: [ReachableProject]?
+ public var allowed: [String]?
+ public var home: String?
+}
+
+public struct ProjectConnection: Codable, Sendable, Identifiable, Equatable {
+ public var id: String
+ public var forge: String
+ public var title: String
+ public var state: String
+ public var canAdd: Bool
+}
+
+public struct ReachableProject: Codable, Sendable, Identifiable, Equatable {
+ public var repo: String
+ public var name: String
+ public var title: String
+ public var description: String
+ public var descriptionSource: String
+ public var forge: String
+ public var connectionId: String
+ public var id: String { repo }
+}
+
+extension EquipoClient {
+ public func setStar(_ id: String, _ starred: Bool) async throws -> ThinProject {
+ try await send(APIRequest("PUT", projectPath(id) + "/star", body: try EquipoJSON.encoder.encode(["starred": starred]), bearer: token))
+ }
+ public func addProject(_ repo: String) async throws -> ThinProject {
+ try await send(APIRequest("POST", "/projects", body: try EquipoJSON.encoder.encode(["repo": repo]), bearer: token))
+ }
+ public func forgetName(_ name: String, projectID: String) async throws {
+ let _: EmptyResponse = try await send(APIRequest("DELETE", projectPath(projectID) + "/names", body: try EquipoJSON.encoder.encode(["name": name]), bearer: token))
+ }
+ private func projectPath(_ id: String) -> String {
+ "/projects/" + (id.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed.subtracting(CharacterSet(charactersIn: "/?#"))) ?? "")
+ }
+}
diff --git a/native/apple/Sources/EquipoKit/API/Thin.swift b/native/apple/Sources/EquipoKit/API/Thin.swift
index 581adfa5..a0995033 100644
--- a/native/apple/Sources/EquipoKit/API/Thin.swift
+++ b/native/apple/Sources/EquipoKit/API/Thin.swift
@@ -16,6 +16,7 @@ public struct ThinMe: Codable, Sendable, Equatable {
}
public struct ThinMessage: Codable, Sendable, Identifiable, Equatable {
+ public var projectId: String? = nil
public var id: String
public var revision: Int64
public var role: String
@@ -26,6 +27,7 @@ public struct ThinMessage: Codable, Sendable, Identifiable, Equatable {
}
public struct ThinTurn: Codable, Sendable, Identifiable, Equatable {
+ public var replyId: String? = nil
public var attempt: Int64? = nil
public var id: String
public var revision: Int64
@@ -39,6 +41,7 @@ public struct ThinTurn: Codable, Sendable, Identifiable, Equatable {
}
public struct ThinCard: Codable, Sendable, Identifiable, Equatable {
+ public var rememberName: String? = nil
public var id: String
public var revision: Int64
public var kind: String
@@ -112,6 +115,14 @@ public struct ThinTask: Codable, Sendable, Identifiable, Equatable {
}
public struct ThinProject: Codable, Sendable, Identifiable, Equatable {
+ public var description: String? = nil
+ public var starred: Bool? = nil
+ public var names: [String]? = nil
+ public var personalNames: [String]? = nil
+ public var titleSource: String? = nil
+ public var descriptionSource: String? = nil
+ public var forge: String? = nil
+ public var connectionId: String? = nil
public var id: String
public var revision: Int64
public var repo: String
diff --git a/native/apple/Sources/EquipoKit/Presentation/Roster.swift b/native/apple/Sources/EquipoKit/Presentation/Roster.swift
index 9e969c80..1c9b3141 100644
--- a/native/apple/Sources/EquipoKit/Presentation/Roster.swift
+++ b/native/apple/Sources/EquipoKit/Presentation/Roster.swift
@@ -111,13 +111,14 @@ public enum FeedItem: Identifiable, Sendable, Equatable {
case draft(ThinTurn, text: String)
public var reply: TranscriptReply? {
switch self {
- case .coordinator(let message): return TranscriptReply(text: message.text, date: message.createdAt, draft: false)
+ case .coordinator(let message), .notice(let message): return TranscriptReply(text: message.text, date: message.createdAt, draft: false)
case .draft(let turn, let text): return TranscriptReply(text: text, date: turn.createdAt, draft: true)
default: return nil
}
}
case own(ThinMessage)
case coordinator(ThinMessage)
+ case notice(ThinMessage)
case outgoing(EquipoSession.Outgoing)
/// A task the conversation reports on; compact while its decision is open.
case report(ThinCard, RosterByline, TaskReport, compact: Bool)
@@ -132,7 +133,7 @@ public enum FeedItem: Identifiable, Sendable, Equatable {
public var id: String {
switch self {
- case .own(let m): return m.id
+ case .own(let m), .notice(let m): return m.id
case .coordinator(let m): return m.turnId.isEmpty ? m.id : "reply-" + m.turnId
case .draft(let t, _): return "reply-" + t.id
case .outgoing(let o): return "outgoing-" + o.id
@@ -149,7 +150,11 @@ public enum Feed {
let deciding = Set(session.cards.filter { $0.isOpen && !$0.isAside && $0.kind != "task" && !$0.taskId.isEmpty }.map(\.taskId))
var timed: [(Date, Int, FeedItem)] = []
for (i, m) in session.messages.enumerated() {
- timed.append((m.createdAt, i, m.isOwn ? .own(m) : .coordinator(m)))
+ let item: FeedItem
+ if m.isOwn { item = .own(m) }
+ else if let turn = session.turns.first(where: { $0.id == m.turnId }), let replyID = turn.replyId, replyID != m.id { item = .notice(m) }
+ else { item = .coordinator(m) }
+ timed.append((m.createdAt, i, item))
}
for (i, card) in session.cards.enumerated() {
let project = session.project(card.projectId)?.displayName
diff --git a/native/apple/Sources/EquipoKit/Projects/ProjectCatalog.swift b/native/apple/Sources/EquipoKit/Projects/ProjectCatalog.swift
new file mode 100644
index 00000000..33680874
--- /dev/null
+++ b/native/apple/Sources/EquipoKit/Projects/ProjectCatalog.swift
@@ -0,0 +1,140 @@
+import Foundation
+import Observation
+
+/// The list's order belongs to the server. Viewer fields have an event
+/// sequence of their own: shared revisions alone cannot order personal names.
+@MainActor @Observable public final class ProjectCatalog {
+ public private(set) var projects: [String: ThinProject] = [:]
+ private var order: [String] = []
+ public private(set) var connections: [ProjectConnection] = []
+ private var reachable: [ReachableProject] = []
+ public private(set) var loaded = false
+ public private(set) var notice: String?
+ public private(set) var pending: Set<String> = []
+ public var selection: ThinProject?
+ var client: EquipoClient
+ let lifetime: SignInLifetime
+ private var sequence: [String: Int64] = [:]
+ private var generation = 0
+ var snapshotGeneration: Int { generation }
+ private var reading = false
+ private var readAgain = false
+
+ init(client: EquipoClient, lifetime: SignInLifetime) { self.client = client; self.lifetime = lifetime }
+ /// The engine's owner form is on the project page, with its current revision.
+ public func detailsURL(_ project: ThinProject) -> URL {
+ client.origin.appendingPathComponent("projects").appendingPathComponent(project.id)
+ }
+ public var items: [ThinProject] { order.compactMap { projects[$0] }.filter { $0.state == "active" } }
+ public var available: [ReachableProject] {
+ reachable.filter { repo in connections.contains { $0.id == repo.connectionId && $0.canAdd } }
+ }
+
+ public func refresh() async {
+ guard lifetime.isActive else { return }
+ if reading { readAgain = true; return }
+ reading = true
+ defer { reading = false }
+ repeat {
+ readAgain = false
+ let started = generation
+ do {
+ let list = try await client.projects()
+ guard lifetime.isActive else { return }
+ // A write or streamed viewer update overtook this read. Read
+ // again; do not restore a personal name or an old star meanwhile.
+ guard started == generation else { readAgain = true; continue }
+ let values = list.items ?? []
+ order = values.map(\.id)
+ for p in values where p.revision >= (projects[p.id]?.revision ?? -1) { projects[p.id] = p }
+ let ids = Set(order)
+ projects = projects.filter { ids.contains($0.key) }
+ connections = list.connections ?? []; reachable = list.canAdd ?? []
+ loaded = true; notice = nil
+ } catch {
+ guard lifetime.isActive else { return }
+ notice = ProjectNotice.text(error)
+ }
+ } while readAgain && lifetime.isActive && !Task.isCancelled
+ }
+
+ func applySnapshot(_ values: [ThinProject], cursor: Int64, generation expected: Int? = nil) {
+ guard lifetime.isActive, expected == nil || expected == generation else { return }
+ for p in values where cursor >= (sequence[p.id] ?? -1) && p.revision >= (projects[p.id]?.revision ?? -1) {
+ projects[p.id] = p
+ sequence[p.id] = cursor
+ }
+ generation += 1
+ }
+ func applyEvent(_ project: ThinProject, cursor: Int64) {
+ guard lifetime.isActive, cursor > (sequence[project.id] ?? -1),
+ project.revision >= (projects[project.id]?.revision ?? -1) else { return }
+ sequence[project.id] = cursor
+ generation += 1
+ projects[project.id] = project
+ }
+
+ public func setStar(_ project: ThinProject, _ starred: Bool) async {
+ guard lifetime.isActive, pending.insert(project.id).inserted else { return }
+ generation += 1
+ let started = generation
+ let old = projects[project.id]
+ projects[project.id]?.starred = starred
+ defer { pending.remove(project.id) }
+ do {
+ let answer = try await client.setStar(project.id, starred)
+ guard lifetime.isActive else { return }
+ if started == generation { projects[project.id] = answer }
+ generation += 1
+ notice = nil
+ // Restore the server's ordering after the optimistic toggle.
+ await refresh()
+ } catch {
+ guard lifetime.isActive else { return }
+ if started == generation { projects[project.id] = old }
+ notice = ProjectNotice.text(error)
+ }
+ }
+ public func forgetName(_ name: String, in project: ThinProject) async {
+ guard lifetime.isActive, pending.insert(project.id).inserted else { return }
+ generation += 1
+ let started = generation
+ defer { pending.remove(project.id) }
+ do {
+ try await client.forgetName(name, projectID: project.id)
+ guard lifetime.isActive else { return }
+ if started == generation {
+ let remaining = (projects[project.id]?.personalNames ?? []).filter { $0.caseInsensitiveCompare(name) != .orderedSame }
+ projects[project.id]?.personalNames = remaining
+ }
+ generation += 1
+ notice = nil
+ } catch { if lifetime.isActive { notice = ProjectNotice.text(error) } }
+ }
+ public func add(_ repo: ReachableProject) async {
+ guard lifetime.isActive, available.contains(repo), pending.insert(repo.id).inserted else { return }
+ generation += 1
+ defer { pending.remove(repo.id) }
+ do {
+ _ = try await client.addProject(repo.repo)
+ guard lifetime.isActive else { return }
+ await refresh()
+ } catch { if lifetime.isActive { notice = ProjectNotice.text(error) } }
+ }
+}
+
+/// Error copy keys are data, never arbitrary format strings. Resolve only
+/// catalog entries we know; otherwise retain the existing native failure copy.
+public enum ProjectNotice {
+ public static func text(_ error: Error) -> String {
+ if case EquipoAPIError.server(_, let body) = error,
+ ["api.not_found", "api.invalid_input", "api.repo_not_allowed", "api.forbidden", "api.idempotency_conflict",
+ "api.card_answered", "api.card_stale", "api.confirmation_required", "api.coordinator_busy", "api.hold_bar",
+ "api.models_not_allowed", "api.not_active", "api.not_askable", "api.not_mergeable", "api.not_retryable",
+ "api.question_ended", "api.runner_offline", "api.task_busy", "api.task_ended", "api.task_merging", "api.turn_ended"].contains(body.copyKey) {
+ let text = EquipoStrings.text(String.LocalizationValue(body.copyKey))
+ if text != body.copyKey { return text }
+ }
+ return EquipoStrings.text(error as? EquipoAPIError == .offline ? "card.offline" : "card.failed")
+ }
+}
diff --git a/native/apple/Sources/EquipoKit/Push/PushRoute.swift b/native/apple/Sources/EquipoKit/Push/PushRoute.swift
index a077cd56..892abc5e 100644
--- a/native/apple/Sources/EquipoKit/Push/PushRoute.swift
+++ b/native/apple/Sources/EquipoKit/Push/PushRoute.swift
@@ -46,7 +46,7 @@ public enum PushRoute: Equatable, Sendable {
/// A screen in the app: a pane (a tab on iPhone, the sidebar on the Mac),
/// and the card to bring into view or the task to open in it.
public struct Destination: Equatable, Sendable {
- public enum Pane: Hashable, Sendable { case conversation, needs, tasks }
+ public enum Pane: Hashable, Sendable { case conversation, needs, tasks, projects }
public var pane: Pane
public var cardID: String?
public var taskID: String?
diff --git a/native/apple/Sources/EquipoKit/Resources/Localizable.xcstrings b/native/apple/Sources/EquipoKit/Resources/Localizable.xcstrings
index 5ab42241..eead16e0 100644
--- a/native/apple/Sources/EquipoKit/Resources/Localizable.xcstrings
+++ b/native/apple/Sources/EquipoKit/Resources/Localizable.xcstrings
@@ -442,6 +442,17 @@
}
}
},
+ "chat.card.answer": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Answer"
+ }
+ }
+ }
+ },
"chat.card.merge": {
"extractionState": "manual",
"localizations": {
@@ -607,6 +618,17 @@
}
}
},
+ "chat.connections.connected": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "%@ connected"
+ }
+ }
+ }
+ },
"chat.paste.command": {
"extractionState": "manual",
"localizations": {
@@ -816,6 +838,17 @@
}
}
},
+ "counts.unavailable": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Unavailable"
+ }
+ }
+ }
+ },
"decision.on_web": {
"extractionState": "manual",
"localizations": {
@@ -926,6 +959,17 @@
}
}
},
+ "nav.projects": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Projects"
+ }
+ }
+ }
+ },
"needs.count %lld": {
"extractionState": "manual",
"localizations": {
@@ -1300,6 +1344,204 @@
}
}
},
+ "projects.add_reachable": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Add project"
+ }
+ }
+ }
+ },
+ "projects.can_add": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Available to add"
+ }
+ }
+ }
+ },
+ "projects.description": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Description"
+ }
+ }
+ }
+ },
+ "projects.details": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Project details"
+ }
+ }
+ }
+ },
+ "projects.edit": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Edit project"
+ }
+ }
+ }
+ },
+ "projects.empty": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "No projects yet."
+ }
+ }
+ }
+ },
+ "projects.forget_name": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Remove this name"
+ }
+ }
+ }
+ },
+ "projects.name_question": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Which project should this go in? Type the project name or repository."
+ }
+ }
+ }
+ },
+ "projects.name_to_remember": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Name to remember"
+ }
+ }
+ }
+ },
+ "projects.names": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Names people use"
+ }
+ }
+ }
+ },
+ "projects.new_request": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "New request"
+ }
+ }
+ }
+ },
+ "projects.other": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Choose another project"
+ }
+ }
+ }
+ },
+ "projects.personal_names": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Your names for this project"
+ }
+ }
+ }
+ },
+ "projects.remember_name": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Remember '%@' for this project"
+ }
+ }
+ }
+ },
+ "projects.remove_selection": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Remove project"
+ }
+ }
+ }
+ },
+ "projects.selection_lost": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "The selected project is no longer available. This request will continue without a project."
+ }
+ }
+ }
+ },
+ "projects.title": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Title"
+ }
+ }
+ }
+ },
+ "projects.yours": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Your projects"
+ }
+ }
+ }
+ },
"question.answered %@": {
"extractionState": "manual",
"localizations": {
@@ -2114,6 +2356,28 @@
}
}
},
+ "work.star.add": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Star %@"
+ }
+ }
+ }
+ },
+ "work.star.remove": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Unstar %@"
+ }
+ }
+ }
+ },
"work.tl.merge_dropped": {
"extractionState": "manual",
"localizations": {
diff --git a/native/apple/Sources/EquipoKit/Session/EquipoSession.swift b/native/apple/Sources/EquipoKit/Session/EquipoSession.swift
index 6c0413ca..db397905 100644
--- a/native/apple/Sources/EquipoKit/Session/EquipoSession.swift
+++ b/native/apple/Sources/EquipoKit/Session/EquipoSession.swift
@@ -18,6 +18,8 @@ public final class EquipoSession {
public let id: String
public let text: String
public let taskID: String?
+ public var notice: String? = nil
+ public var projectName: String? = nil
public var state: State
let write: PendingWrite
}
@@ -37,7 +39,9 @@ public final class EquipoSession {
public private(set) var tasks: [ThinTask] = []
/// nil until loaded: an unknown count is not zero.
public private(set) var needsYou: [ThinTask]?
- public private(set) var projects: [String: ThinProject] = [:]
+ public let projectCatalog: ProjectCatalog
+ public var projects: [String: ThinProject] { projectCatalog.projects }
+ public private(set) var answerNotices: [String: String] = [:]
/// The latest activity of each live turn, from the event stream.
public private(set) var activity: [String: ThinActivity] = [:]
public private(set) var outgoing: [Outgoing] = []
@@ -71,7 +75,9 @@ public final class EquipoSession {
self.lifetime = lifetime
let transport = transport ?? URLSessionTransport(origin: account.origin)
self.revocationTransport = transport
- self.client = EquipoClient(transport: LifetimeTransport(inner: transport, lifetime: lifetime), token: account.credential?.token)
+ let client = EquipoClient(transport: LifetimeTransport(inner: transport, lifetime: lifetime), token: account.credential?.token)
+ self.client = client
+ projectCatalog = ProjectCatalog(client: client, lifetime: lifetime)
if !account.isUsable() { status = .signedOut }
}
@@ -96,13 +102,14 @@ public final class EquipoSession {
private func refreshPass() async {
guard !isInvalidated else { return }
let client = self.client
+ let projectGeneration = projectCatalog.snapshotGeneration
do {
async let snapshotRead = client.snapshot()
async let taskRead = client.tasks()
async let needsRead = client.needsYou()
let (snapshot, taskList, needsList) = try await (snapshotRead, taskRead, needsRead)
guard !isInvalidated else { return }
- apply(snapshot)
+ apply(snapshot, projectGeneration: projectGeneration)
tasks = taskList.items ?? []
needsYou = needsList.items ?? []
status = .ready
@@ -123,18 +130,18 @@ public final class EquipoSession {
}
}
- func apply(_ snapshot: Snapshot) {
+ func apply(_ snapshot: Snapshot, projectGeneration: Int? = nil) {
guard !isInvalidated else { return }
me = snapshot.me
messages = Self.merge(messages, snapshot.messages ?? [])
turns = Self.merge(turns, snapshot.turns ?? [])
cards = Self.merge(cards, snapshot.cards ?? [])
- projects = Dictionary((snapshot.projects ?? []).map { ($0.id, $0) }, uniquingKeysWith: { a, _ in a })
+ projectCatalog.applySnapshot(snapshot.projects ?? [], cursor: snapshot.cursor, generation: projectGeneration)
cursor = max(cursor, snapshot.cursor)
let liveIDs = Set(turns.filter(\.isLive).map(\.id))
activity = activity.filter { liveIDs.contains($0.key) }
stopping.formIntersection(liveIDs)
- let replied = Set(messages.filter { !$0.isOwn }.map(\.turnId))
+ let replied = Set(messages.filter { isFinalReply($0) }.map(\.turnId))
drafts = drafts.filter { id, draft in
guard !replied.contains(id) else { return false }
// A read already in flight can predate the first delta. Keep it
@@ -149,6 +156,12 @@ public final class EquipoSession {
}
}
+ private func isFinalReply(_ message: ThinMessage) -> Bool {
+ guard !message.isOwn else { return false }
+ guard let replyID = turns.first(where: { $0.id == message.turnId })?.replyId else { return true }
+ return replyID == message.id
+ }
+
/// Reconciles by ID; the newer revision wins.
static func merge<T: Identifiable & Sendable>(_ old: [T], _ new: [T]) -> [T] where T.ID == String, T: Revisioned {
var byID = Dictionary(old.map { ($0.id, $0) }, uniquingKeysWith: { a, _ in a })
@@ -196,6 +209,11 @@ public final class EquipoSession {
let json = Data(line.dropFirst(5).trimmingCharacters(in: .whitespaces).utf8)
guard let event = try? EquipoJSON.decoder.decode(EventEnvelope.self, from: json) else { return }
if let c = event.cursor { cursor = max(cursor, c) }
+ if event.resource == "project", let project = event.project, let sequence = event.cursor {
+ projectCatalog.applyEvent(project, cursor: sequence)
+ Task { await projectCatalog.refresh() }
+ return
+ }
if event.type == "activity" {
if event.resource == "turn", let data = event.activity { activity[data.turnId] = data }
return
@@ -204,7 +222,7 @@ public final class EquipoSession {
if event.type == "delta" {
guard event.resource == "turn", let delta = event.delta, let attempt = event.attempt,
attempt > 0, delta.offset >= 0, !delta.text.isEmpty,
- !messages.contains(where: { !$0.isOwn && $0.turnId == delta.turnId }) else { return }
+ !messages.contains(where: { isFinalReply($0) && $0.turnId == delta.turnId }) else { return }
if let turn = turns.first(where: { $0.id == delta.turnId }),
!turn.isLive || attempt < (turn.attempt ?? 0) { return }
let old = drafts[delta.turnId]
@@ -250,6 +268,7 @@ public final class EquipoSession {
var type: String
var resource: String
var activity: ThinActivity?
+ var project: ThinProject?
var attempt: Int64?
var delta: ReplyDelta?
struct ReplyDelta: Decodable { var turnId: String; var offset: Int; var text: String }
@@ -260,6 +279,7 @@ public final class EquipoSession {
type = try c.decode(String.self, forKey: .type)
resource = try c.decodeIfPresent(String.self, forKey: .resource) ?? ""
attempt = try c.decodeIfPresent(Int64.self, forKey: .attempt)
+ project = resource == "project" ? try? c.decode(ThinProject.self, forKey: .data) : nil
delta = type == "delta" && resource == "turn" ? try? c.decode(ReplyDelta.self, forKey: .data) : nil
activity = type == "activity" && resource == "turn" ? try? c.decode(ThinActivity.self, forKey: .data) : nil
}
@@ -276,10 +296,10 @@ public final class EquipoSession {
// MARK: Sending
- public func send(_ text: String, inThreadOf taskID: String? = nil) async {
+ public func send(_ text: String, inThreadOf taskID: String? = nil, projectID: String? = nil) async {
let text = text.trimmingCharacters(in: .whitespacesAndNewlines)
- guard lifetime.isActive, !text.isEmpty, let write = try? EquipoClient.message(text) else { return }
- outgoing.append(Outgoing(id: write.key, text: text, taskID: taskID, state: .sending, write: write))
+ guard lifetime.isActive, !text.isEmpty, let write = try? EquipoClient.message(text, projectID: taskID == nil ? projectID : nil) else { return }
+ outgoing.append(Outgoing(id: write.key, text: text, taskID: taskID, projectName: projectID.flatMap { projects[$0]?.displayName }, state: .sending, write: write))
await deliver(write.key)
}
@@ -310,7 +330,7 @@ public final class EquipoSession {
} catch let error as EquipoAPIError {
guard lifetime.isActive else { return }
if error.endsSession { endSession(); return }
- if let i = outgoing.firstIndex(where: { $0.id == id }) { outgoing[i].state = error == .offline ? .waiting : .failed }
+ if let i = outgoing.firstIndex(where: { $0.id == id }) { outgoing[i].state = error == .offline ? .waiting : .failed; outgoing[i].notice = ProjectNotice.text(error) }
} catch {
guard lifetime.isActive else { return }
// Cancelled on the way: it may yet be sent, as itself.
@@ -330,11 +350,12 @@ public final class EquipoSession {
/// Answers a card as the person saw it, bound to that revision. A lost
/// answer is retried as itself; a stale one is never sent again.
- public func answer(_ card: ThinCard, choice: String, note: String? = nil) async -> AnswerOutcome {
+ public func answer(_ card: ThinCard, choice: String, note: String? = nil, rememberName: String? = nil) async -> AnswerOutcome {
guard lifetime.isActive else { return .failed }
guard card.isOpen else { return .changed }
- let slot = "\(card.id)#\(card.revision)#\(choice)#\(note ?? "")"
- guard let write = unsettledAnswers[slot] ?? (try? EquipoClient.answer(choice, note: note, to: card)) else { return .failed }
+ let slot = "\(card.id)#\(card.revision)#\(choice)#\(note ?? "")#\(rememberName ?? "")"
+ answerNotices[card.id] = nil
+ guard let write = unsettledAnswers[slot] ?? (try? EquipoClient.answer(choice, note: note, rememberName: rememberName, to: card)) else { return .failed }
unsettledAnswers[slot] = write
var attempts = 0
while true {
@@ -354,6 +375,7 @@ public final class EquipoSession {
if error.endsSession { endSession(); return .failed }
if case .card(_, _, let current) = error { cards = Self.merge(cards, [current]); return .changed }
if error.isStale { await refresh(); return .changed }
+ answerNotices[card.id] = ProjectNotice.text(error)
return error == .offline ? .offline : .failed
} catch { unsettledAnswers[slot] = nil; return .failed }
}
@@ -386,6 +408,7 @@ public final class EquipoSession {
if error.endsSession { endSession(); return .failed }
if case .card(_, _, let current) = error { cards = Self.merge(cards, [current]); return .changed }
if error.isStale { await refresh(); return .changed }
+ answerNotices[card.id] = ProjectNotice.text(error)
return error == .offline ? .offline : .failed
} catch { unsettledVisibility[slot] = nil; return .failed }
}
@@ -411,6 +434,7 @@ public final class EquipoSession {
self.account = account
revocationTransport = transport
client = EquipoClient(transport: LifetimeTransport(inner: transport, lifetime: lifetime), token: account.credential?.token)
+ projectCatalog.client = client
if status == .signedOut { status = .loading }
}
diff --git a/native/apple/Sources/EquipoKit/UI/LiveCards.swift b/native/apple/Sources/EquipoKit/UI/LiveCards.swift
index 2cf8efae..b8d7609c 100644
--- a/native/apple/Sources/EquipoKit/UI/LiveCards.swift
+++ b/native/apple/Sources/EquipoKit/UI/LiveCards.swift
@@ -4,15 +4,23 @@ import SwiftUI
/// the revision the person saw. A card that changed underneath is shown as
/// it is now and never answered on the person's behalf. Words of their own
/// go in the composer, as a message.
-struct LiveQuestionCard: View {
+public struct LiveQuestionCard: View {
let card: ThinCard
let taskTitle: String?
let session: EquipoSession
@State private var phase: Phase = .open
+ @State private var name: String
+ @State private var remembers = true
+ @State private var typedChoice = ""
+
+ public init(card: ThinCard, taskTitle: String?, session: EquipoSession) {
+ self.card = card; self.taskTitle = taskTitle; self.session = session
+ _name = State(initialValue: card.rememberName ?? "")
+ }
enum Phase: Equatable { case open, sending(String), settingAside, changed(at: Int64), offline, failed }
- var body: some View {
+ public var body: some View {
if card.isAside {
AsideStub(card: card, title: Feed.asideTitle(card, task: session.task(card.taskId)), session: session)
} else {
@@ -28,6 +36,11 @@ struct LiveQuestionCard: View {
CardHead(text: card.question.isEmpty ? String(localized: "card.question", bundle: .module) : card.question,
aside: aside, settingAside: phase == .settingAside)
if card.isOpen {
+ if card.rememberName != nil {
+ Toggle(String(format: EquipoStrings.text("projects.remember_name"), name), isOn: $remembers).disabled(isSending)
+ TextField(EquipoStrings.text("projects.name_to_remember"), text: $name)
+ .textFieldStyle(.roundedBorder).disabled(!remembers || isSending)
+ }
choices
feedback
} else if !card.choice.isEmpty {
@@ -39,6 +52,7 @@ struct LiveQuestionCard: View {
}
.accessibilityElement(children: .contain)
.onChange(of: card.revision) { _, now in
+ name = card.rememberName ?? ""; remembers = true; typedChoice = ""
if case .changed(let at) = phase, !AnswerFeedback.stillChanged(conflictAt: at, now: now) { phase = .open }
}
}
@@ -51,7 +65,14 @@ struct LiveQuestionCard: View {
@ViewBuilder private var choices: some View {
let options = card.options ?? []
- if !options.isEmpty {
+ if options.isEmpty {
+ TextField(EquipoStrings.text("projects.other"), text: $typedChoice)
+ .textFieldStyle(.roundedBorder).onSubmit { Task { await submit(typedChoice) } }
+ .disabled(isSending)
+ RosterButton(title: EquipoStrings.text("chat.card.answer"), primary: true, expanded: false) {
+ Task { await submit(typedChoice) }
+ }.disabled(isSending || typedChoice.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)
+ } else {
ViewThatFits(in: .horizontal) {
HStack(spacing: 10) { optionButtons(options) }
VStack(spacing: 10) { optionButtons(options) }
@@ -72,14 +93,15 @@ struct LiveQuestionCard: View {
switch phase {
case .changed: Text(String(localized: "card.changed", bundle: .module)).font(Typo.secondary).foregroundStyle(Palette.negative)
case .offline: Text(String(localized: "card.offline", bundle: .module)).font(Typo.secondary).foregroundStyle(Palette.negative)
- case .failed: Text(String(localized: "card.failed", bundle: .module)).font(Typo.secondary).foregroundStyle(Palette.negative)
+ case .failed: Text(session.answerNotices[card.id] ?? String(localized: "card.failed", bundle: .module)).font(Typo.secondary).foregroundStyle(Palette.negative)
default: EmptyView()
}
}
private func submit(_ choice: String) async {
+ guard !isSending, !choice.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty else { return }
phase = .sending(choice)
- switch await session.answer(card, choice: choice) {
+ switch await session.answer(card, choice: choice, rememberName: card.rememberName == nil ? nil : (remembers ? name : "")) {
case .answered: phase = .open
case .changed: phase = .changed(at: session.cards.first { $0.id == card.id }?.revision ?? card.revision)
case .offline: phase = .offline
diff --git a/native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift b/native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift
index 81ca60a3..f6f3c625 100644
--- a/native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift
+++ b/native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift
@@ -41,8 +41,13 @@ public struct ConversationScreen: View {
.background(Palette.background)
.safeAreaInset(edge: .top, spacing: 0) { NativeOfflineBanner(origin: session.origin) }
.safeAreaInset(edge: .bottom, spacing: 0) {
- Composer(placeholder: String(localized: "conversation.placeholder", bundle: .module)) { text in
- Task { await session.send(text) }
+ VStack(spacing: 0) {
+ ProjectSelectionChip(catalog: session.projectCatalog)
+ Composer(placeholder: String(localized: "conversation.placeholder", bundle: .module)) { text in
+ let id = session.projectCatalog.selection?.id
+ session.projectCatalog.selection = nil
+ Task { await session.send(text, projectID: id) }
+ }
}
}
}
@@ -69,7 +74,7 @@ public struct ConversationScreen: View {
CoordinatorMessage(reply: reply, messageID: item.id, origin: session.origin, transcript: session.markdown, openTask: openTask)
} else {
switch item {
- case .draft, .coordinator: EmptyView()
+ case .draft, .coordinator, .notice: EmptyView()
case .own(let m): OwnMessage(text: m.text)
case .outgoing(let o): OutgoingMessage(item: o) { Task { await session.retry(o.id) } }
case .report(_, let byline, let report, let compact):
@@ -102,7 +107,9 @@ struct OutgoingMessage: View {
var retry: () -> Void
var body: some View {
VStack(alignment: .trailing, spacing: 4) {
+ if let project = item.projectName { ProjectChip(name: project) }
OwnMessage(text: item.text).opacity(item.state == .sending ? 0.7 : 1)
+ if let notice = item.notice { Text(notice).font(Typo.secondary).foregroundStyle(Palette.negative) }
switch item.state {
case .sending: Text(String(localized: "message.sending", bundle: .module)).font(Typo.caption).foregroundStyle(Palette.faint)
case .waiting:
diff --git a/native/apple/Sources/EquipoKit/UI/Screens/PhoneRoot.swift b/native/apple/Sources/EquipoKit/UI/Screens/PhoneRoot.swift
index 06a9919d..e15da3ad 100644
--- a/native/apple/Sources/EquipoKit/UI/Screens/PhoneRoot.swift
+++ b/native/apple/Sources/EquipoKit/UI/Screens/PhoneRoot.swift
@@ -43,6 +43,8 @@ struct PhoneTabs: View {
@State private var conversationPath: [String] = []
@State private var needsPath: [String] = []
@State private var tasksPath: [String] = []
+ @State private var projectsPath: [ProjectRoute] = []
+ private enum ProjectRoute: Hashable { case project(String), task(String) }
@State private var focusCard: String?
@State private var showingAccount = false
@@ -59,6 +61,23 @@ struct PhoneTabs: View {
}
}
.badge(session.needsYou?.count ?? 0)
+ Tab(String(localized: "nav.projects", bundle: .module), systemImage: "folder", value: .projects) {
+ NavigationStack(path: $projectsPath) {
+ ProjectsScreen(session: session) { projectsPath.append(.project($0)) }
+ .navigationTitle(String(localized: "nav.projects", bundle: .module))
+ .navigationBarTitleDisplayMode(.inline)
+ .navigationDestination(for: ProjectRoute.self) { route in
+ switch route {
+ case .project(let id):
+ ProjectDetailScreen(session: session, projectID: id) { project in
+ session.projectCatalog.selection = project
+ conversationPath = []; tab = .conversation
+ } openTask: { projectsPath.append(.task($0)) }
+ case .task(let id): TaskScreen(session: session, taskID: id)
+ }
+ }
+ }
+ }
Tab(String(localized: "tab.tasks", bundle: .module), systemImage: "checklist", value: .tasks) {
stack($tasksPath, title: String(localized: "tab.tasks", bundle: .module)) {
TasksScreen(session: session) { tasksPath.append($0) }
@@ -82,6 +101,7 @@ struct PhoneTabs: View {
switch destination.pane {
case .conversation: conversationPath = []; focusCard = destination.cardID
case .needs: needsPath = []
+ case .projects: projectsPath = []
case .tasks: tasksPath = destination.taskID.map { [$0] } ?? []
}
}
diff --git a/native/apple/Sources/EquipoKit/UI/Screens/ProjectsScreen.swift b/native/apple/Sources/EquipoKit/UI/Screens/ProjectsScreen.swift
new file mode 100644
index 00000000..3731d39d
--- /dev/null
+++ b/native/apple/Sources/EquipoKit/UI/Screens/ProjectsScreen.swift
@@ -0,0 +1,150 @@
+import SwiftUI
+
+public struct ProjectsScreen: View {
+ let session: EquipoSession
+ @Environment(\.scenePhase) private var phase
+ let openProject: (String) -> Void
+ public init(session: EquipoSession, openProject: @escaping (String) -> Void) {
+ self.session = session; self.openProject = openProject
+ }
+ public var body: some View {
+ let catalog = session.projectCatalog
+ List {
+ ForEach(catalog.connections) { connection in
+ HStack {
+ Text(connection.title).font(Typo.secondaryStrong)
+ Spacer()
+ Text(connection.state == "connected"
+ ? String(format: EquipoStrings.text("chat.connections.connected"), connection.title)
+ : EquipoStrings.text("counts.unavailable"))
+ .font(Typo.caption).foregroundStyle(Palette.secondary)
+ }
+ }
+ if let notice = catalog.notice {
+ Text(notice).font(Typo.secondary).foregroundStyle(Palette.negative)
+ Button(EquipoStrings.text("read.retry")) { Task { await catalog.refresh() } }
+ }
+ Section(EquipoStrings.text("projects.yours")) {
+ ForEach(catalog.items) { project in
+ HStack(alignment: .top, spacing: 12) {
+ Button { openProject(project.id) } label: { ProjectSummary(project: project) }
+ .buttonStyle(.plain).frame(maxWidth: .infinity, alignment: .leading)
+ ProjectStar(project: project, catalog: catalog)
+ }
+ }
+ if catalog.loaded && catalog.items.isEmpty { Text(EquipoStrings.text("projects.empty")).foregroundStyle(Palette.secondary) }
+ if !catalog.loaded && catalog.notice == nil { ProgressView() }
+ }
+ if !catalog.available.isEmpty {
+ Section(EquipoStrings.text("projects.can_add")) {
+ ForEach(catalog.available) { repo in
+ VStack(alignment: .leading, spacing: 8) {
+ Text(repo.title.isEmpty ? repo.name : repo.title).font(Typo.secondaryStrong)
+ Text(repo.repo).font(Typo.caption).foregroundStyle(Palette.secondary)
+ if !repo.description.isEmpty { Text(repo.description).font(Typo.secondary) }
+ Button(EquipoStrings.text("projects.add_reachable")) { Task { await catalog.add(repo) } }
+ .disabled(catalog.pending.contains(repo.id))
+ }
+ }
+ }
+ }
+ }
+ .scrollContentBackground(.hidden).background(Palette.background)
+ .task { await catalog.refresh() }
+ .onChange(of: phase) { _, phase in if phase == .active { Task { await catalog.refresh() } } }
+ .refreshable { await catalog.refresh() }
+ }
+}
+
+struct ProjectSummary: View {
+ let project: ThinProject
+ var body: some View {
+ VStack(alignment: .leading, spacing: 5) {
+ Text(project.displayName).font(Typo.secondaryStrong).foregroundStyle(Palette.text)
+ Text(project.repo).font(Typo.caption).foregroundStyle(Palette.secondary)
+ if let description = project.description, !description.isEmpty {
+ Text(description).font(Typo.secondary).foregroundStyle(Palette.secondary)
+ }
+ }
+ .frame(maxWidth: .infinity, alignment: .leading).contentShape(Rectangle())
+ }
+}
+
+struct ProjectStar: View {
+ let project: ThinProject
+ let catalog: ProjectCatalog
+ var body: some View {
+ Button { Task { await catalog.setStar(project, project.starred != true) } } label: {
+ Image(systemName: project.starred == true ? "star.fill" : "star")
+ .foregroundStyle(project.starred == true ? Palette.accent : Palette.secondary)
+ .frame(minWidth: 44, minHeight: 44)
+ }
+ .buttonStyle(.plain).disabled(catalog.pending.contains(project.id))
+ .accessibilityLabel(String(format: EquipoStrings.text(project.starred == true ? "work.star.remove" : "work.star.add"), project.displayName))
+ }
+}
+
+public struct ProjectDetailScreen: View {
+ let session: EquipoSession
+ let projectID: String
+ let newRequest: (ThinProject) -> Void
+ let openTask: (String) -> Void
+ public init(session: EquipoSession, projectID: String, newRequest: @escaping (ThinProject) -> Void, openTask: @escaping (String) -> Void) {
+ self.session = session; self.projectID = projectID; self.newRequest = newRequest; self.openTask = openTask
+ }
+ public var body: some View {
+ let catalog = session.projectCatalog
+ ScrollView {
+ VStack(alignment: .leading, spacing: 20) {
+ if let project = catalog.projects[projectID], project.state == "active" {
+ HStack(alignment: .top) { ProjectSummary(project: project); ProjectStar(project: project, catalog: catalog) }
+ Button(EquipoStrings.text("projects.new_request")) { newRequest(project) }
+ .buttonStyle(.borderedProminent)
+ if let notice = catalog.notice { Text(notice).foregroundStyle(Palette.negative) }
+ if let names = project.names, !names.isEmpty {
+ SectionTitle(text: EquipoStrings.text("projects.names"))
+ ForEach(names, id: \.self) { Text($0).font(Typo.body) }
+ }
+ if let names = project.personalNames, !names.isEmpty {
+ SectionTitle(text: EquipoStrings.text("projects.personal_names"))
+ ForEach(names, id: \.self) { name in
+ VStack(alignment: .leading, spacing: 4) {
+ Text(name).font(Typo.body)
+ Button(EquipoStrings.text("projects.forget_name")) { Task { await catalog.forgetName(name, in: project) } }
+ .disabled(catalog.pending.contains(project.id))
+ .accessibilityValue(name)
+ }
+ }
+ }
+ if session.me?.role == "owner" {
+ Link(EquipoStrings.text("projects.edit"), destination: catalog.detailsURL(project))
+ }
+ ForEach(session.tasks.filter { $0.projectId == project.id }) { task in
+ TaskRowButton(task: task, needsYou: session.waitsOnYou(task)) { openTask(task.id) }
+ }
+ } else { Text(EquipoStrings.text("api.not_found")).foregroundStyle(Palette.secondary) }
+ }
+ .padding(16).frame(maxWidth: 760, alignment: .leading).frame(maxWidth: .infinity)
+ }
+ .background(Palette.background)
+ .refreshable { await catalog.refresh() }
+ }
+}
+
+/// The selection belongs to the next composer message, and never to a task thread.
+public struct ProjectSelectionChip: View {
+ let catalog: ProjectCatalog
+ public init(catalog: ProjectCatalog) { self.catalog = catalog }
+ public var body: some View {
+ if let project = catalog.selection {
+ HStack(spacing: 8) {
+ Image(systemName: "folder")
+ Text(project.displayName).font(Typo.secondaryStrong)
+ Button { catalog.selection = nil } label: { Image(systemName: "xmark").frame(minWidth: 44, minHeight: 44) }
+ .buttonStyle(.plain).accessibilityLabel(EquipoStrings.text("projects.remove_selection"))
+ }
+ .padding(.leading, 12).background(Palette.surface2, in: Capsule()).padding(.horizontal, 16)
+ .frame(maxWidth: .infinity, alignment: .leading)
+ }
+ }
+}
diff --git a/native/apple/Sources/EquipoMac/LiveTranscript.swift b/native/apple/Sources/EquipoMac/LiveTranscript.swift
index 6f47c2ce..4700fbb4 100644
--- a/native/apple/Sources/EquipoMac/LiveTranscript.swift
+++ b/native/apple/Sources/EquipoMac/LiveTranscript.swift
@@ -32,6 +32,7 @@ final class LiveTranscript: NSView {
let composer = MacComposer()
// Keep each reply's SwiftUI host across delta and completion rebuilds.
// In particular, closing a fence keeps its scroll position and Copy state.
+ private var questionHosts: [String: NSHostingView<QuestionCardHost>] = [:]
private var replyHosts: [String: NSHostingView<MarkdownReplyHost>] = [:]
private struct RowRevision: Equatable {
let item: FeedItem
@@ -68,7 +69,9 @@ final class LiveTranscript: NSView {
composer.onSend = { [weak self] text in
guard let self else { return }
let session = self.session
- Task { await session.send(text) }
+ let projectID = session.projectCatalog.selection?.id
+ session.projectCatalog.selection = nil
+ Task { await session.send(text, projectID: projectID) }
}
setAccessibilityLabel(EquipoStrings.text("tab.conversation"))
}
@@ -119,6 +122,7 @@ final class LiveTranscript: NSView {
for id in Array(rows.keys) where !ids.contains(id) {
rows.removeValue(forKey: id)?.view.removeFromSuperview()
replyHosts.removeValue(forKey: id)
+ questionHosts.removeValue(forKey: id)
}
let column = self.column
var y: CGFloat = 24
@@ -189,11 +193,15 @@ final class LiveTranscript: NSView {
switch item {
case .own(let message):
place(ownBubble(message.text, width: width), x: width - ownWidth(message.text, width: width))
- case .coordinator, .draft: break
+ case .coordinator, .draft, .notice: break
case .outgoing(let outgoing):
+ if let project = outgoing.projectName { place(makeText(project, MacType.caption, .webSecondary, width: width), gapAfter: 4) }
let bubble = ownBubble(outgoing.text, width: width)
bubble.alphaValue = outgoing.state == .sending ? 0.6 : 1
place(bubble, x: width - bubble.frame.width, gapAfter: 4)
+ if let notice = outgoing.notice {
+ place(makeText(notice, MacType.small, .webNegative, width: width))
+ }
let status = outgoingStatus(outgoing)
place(status, x: width - status.frame.width)
case .report(_, let byline, let report, let compact):
@@ -201,7 +209,22 @@ final class LiveTranscript: NSView {
place(hosted(LiveReport(report: report, compact: compact, wide: true) { [weak self] in self?.openTask(report.task.id) }, width: width), gapAfter: 24)
case .question(let card, let byline):
place(bylineView(byline, width: width), gapAfter: MacMetric.bylineGap)
- placeCard(questionCard(card, taskTitle: session.task(card.taskId)?.title, width: content))
+ if card.rememberName != nil || (card.options ?? []).isEmpty {
+ let root = QuestionCardHost(card: card, taskTitle: session.task(card.taskId)?.title, session: session, width: content) { [weak self] in
+ Task { @MainActor [weak self] in
+ await Task.yield()
+ guard let self, let host = self.questionHosts[card.id] else { return }
+ self.resizeHost(host)
+ }
+ }
+ let host = questionHosts[card.id] ?? NSHostingView(rootView: root)
+ host.rootView = root
+ host.frame.size = NSSize(width: content, height: ceil(host.fittingSize.height))
+ questionHosts[card.id] = host
+ place(host, x: MacMetric.gutter, gapAfter: 24)
+ } else {
+ placeCard(questionCard(card, taskTitle: session.task(card.taskId)?.title, width: content))
+ }
case .decision(let card, let byline):
place(bylineView(byline, width: width), gapAfter: MacMetric.bylineGap)
placeCard(decisionCard(card, taskTitle: session.task(card.taskId)?.title, width: content))
@@ -288,7 +311,12 @@ final class LiveTranscript: NSView {
}
private func resizeReply(_ id: String) {
- guard let host = replyHosts[id], let row = host.superview, row.superview === document else { return }
+ guard let host = replyHosts[id] else { return }
+ resizeHost(host)
+ }
+
+ private func resizeHost(_ host: NSView) {
+ guard let row = host.superview, row.superview === document else { return }
let height = ceil(host.fittingSize.height)
let delta = height - host.frame.height
guard abs(delta) > 0.5 else { return }
@@ -619,3 +647,18 @@ private struct MarkdownReplyHost: View {
.frame(width: width, alignment: .leading)
}
}
+
+private struct QuestionCardHost: View {
+ let card: ThinCard
+ let taskTitle: String?
+ let session: EquipoSession
+ let width: CGFloat
+ let onHeightChange: () -> Void
+ var body: some View {
+ LiveQuestionCard(card: card, taskTitle: taskTitle, session: session)
+ .id(card.revision)
+ .frame(width: width, alignment: .leading)
+ .fixedSize(horizontal: false, vertical: true)
+ .onGeometryChange(for: CGFloat.self) { $0.size.height } action: { _ in onHeightChange() }
+ }
+}
diff --git a/native/apple/Sources/EquipoMac/MacMainView.swift b/native/apple/Sources/EquipoMac/MacMainView.swift
index b0ca5e57..38876f4a 100644
--- a/native/apple/Sources/EquipoMac/MacMainView.swift
+++ b/native/apple/Sources/EquipoMac/MacMainView.swift
@@ -11,6 +11,7 @@ struct MacMainView: View {
typealias Pane = Destination.Pane
@State private var pane: Pane = .conversation
@State private var inspectedTask: String?
+ @State private var inspectedProject: String?
@State private var showsInspector = false
/// A card to bring into view (a tapped notification).
@State private var focusCard: String?
@@ -21,6 +22,7 @@ struct MacMainView: View {
Label(EquipoStrings.text("tab.conversation"), systemImage: "bubble.left.and.bubble.right").tag(Pane.conversation)
needsRow.tag(Pane.needs)
Label(EquipoStrings.text("tab.tasks"), systemImage: "checklist").tag(Pane.tasks)
+ Label(EquipoStrings.text("nav.projects"), systemImage: "folder").tag(Pane.projects)
}
.listStyle(.sidebar)
.navigationSplitViewColumnWidth(min: 200, ideal: 220, max: 280)
@@ -56,6 +58,18 @@ struct MacMainView: View {
switch pane {
case .conversation:
TranscriptView(items: Feed.build(session), session: session, focusCard: $focusCard, openTask: open)
+ .safeAreaInset(edge: .bottom, spacing: 0) { ProjectSelectionChip(catalog: session.projectCatalog).padding(.bottom, 8) }
+ case .projects:
+ HStack(spacing: 0) {
+ ProjectsScreen(session: session) { inspectedProject = $0 }
+ .frame(minWidth: 260, idealWidth: 340, maxWidth: 420)
+ Divider()
+ if let id = inspectedProject {
+ ProjectDetailScreen(session: session, projectID: id) { project in
+ session.projectCatalog.selection = project; pane = .conversation
+ } openTask: { open($0) }
+ } else { Color.clear.frame(maxWidth: .infinity) }
+ }
case .needs:
NeedsScreen(session: session, openTask: open)
case .tasks:
@@ -88,6 +102,7 @@ struct MacMainView: View {
case .conversation: return EquipoStrings.text("tab.conversation")
case .needs: return EquipoStrings.text("tab.needs")
case .tasks: return EquipoStrings.text("tab.tasks")
+ case .projects: return EquipoStrings.text("nav.projects")
}
}
diff --git a/native/apple/Tests/EquipoKitTests/Fixtures/project-card.json b/native/apple/Tests/EquipoKitTests/Fixtures/project-card.json
new file mode 100644
index 00000000..4823d772
--- /dev/null
+++ b/native/apple/Tests/EquipoKitTests/Fixtures/project-card.json
@@ -0,0 +1,16 @@
+{
+ "choice": "",
+ "created_at": "2026-11-17T11:59:59.93041Z",
+ "id": "c_project",
+ "kind": "question",
+ "name": "oficina/sample",
+ "options": [],
+ "project_id": "p_dogiihcx5hlvgbhrrs7tq3eebr",
+ "question": "Which project should this go in? Type the project name or repository.",
+ "revision": 1,
+ "state": "open",
+ "task_id": "",
+ "turn_id": "t_qx3y2mwzyh5b7isafhjc6y4l4z",
+ "updated_at": "2026-11-17T11:59:59.93041Z",
+ "remember_name": "my reader"
+}
diff --git a/native/apple/Tests/EquipoKitTests/Fixtures/project-invalid.json b/native/apple/Tests/EquipoKitTests/Fixtures/project-invalid.json
new file mode 100644
index 00000000..b5f5b431
--- /dev/null
+++ b/native/apple/Tests/EquipoKitTests/Fixtures/project-invalid.json
@@ -0,0 +1,5 @@
+{
+ "code": "invalid_input",
+ "copy_key": "api.invalid_input",
+ "request_id": "fixture"
+}
diff --git a/native/apple/Tests/EquipoKitTests/Fixtures/project-list.json b/native/apple/Tests/EquipoKitTests/Fixtures/project-list.json
new file mode 100644
index 00000000..a0002e7d
--- /dev/null
+++ b/native/apple/Tests/EquipoKitTests/Fixtures/project-list.json
@@ -0,0 +1,124 @@
+{
+ "items": [
+ {
+ "added_by": "owner@example.com",
+ "attachments": [
+ {
+ "default_branch": "main",
+ "head_at": null,
+ "head_sha": "9999999999999999999999999999999999999999",
+ "head_subject": "Trim the compose sheet",
+ "kind": "repo",
+ "name": "oficina/sample",
+ "ref": "amadan.net/oficina/sample"
+ }
+ ],
+ "checks": {
+ "gate": "make ci",
+ "here": true,
+ "reason": ""
+ },
+ "created_at": "2026-11-18T20:37:44.538005Z",
+ "description": "Woodstar is a reading app.",
+ "id": "p_star",
+ "name": "oficina/sample",
+ "people": [
+ {
+ "address": "owner@example.com",
+ "initials": "O",
+ "name": "Owner"
+ }
+ ],
+ "repo": "amadan.net/oficina/sample",
+ "revision": 1,
+ "stack": [
+ "Go"
+ ],
+ "state": "active",
+ "title": "Woodstar",
+ "updated_at": "2026-11-18T20:37:44.538005Z",
+ "starred": true,
+ "names": [
+ "Reading"
+ ],
+ "personal_names": [
+ "my reader"
+ ],
+ "forge": "amadan",
+ "connection_id": "amadan",
+ "title_source": "owner",
+ "description_source": "repository"
+ },
+ {
+ "added_by": "owner@example.com",
+ "attachments": [
+ {
+ "default_branch": "main",
+ "head_at": null,
+ "head_sha": "9999999999999999999999999999999999999999",
+ "head_subject": "Trim the compose sheet",
+ "kind": "repo",
+ "name": "oficina/sample",
+ "ref": "amadan.net/oficina/sample"
+ }
+ ],
+ "checks": {
+ "gate": "make ci",
+ "here": true,
+ "reason": ""
+ },
+ "created_at": "2026-11-18T20:37:44.538005Z",
+ "description": "Woodstar is a reading app.",
+ "id": "p_recent",
+ "name": "oficina/sample",
+ "people": [
+ {
+ "address": "owner@example.com",
+ "initials": "O",
+ "name": "Owner"
+ }
+ ],
+ "repo": "amadan.net/oficina/sample",
+ "revision": 1,
+ "stack": [
+ "Go"
+ ],
+ "state": "active",
+ "title": "Recent",
+ "updated_at": "2026-11-18T20:37:44.538005Z",
+ "starred": false,
+ "names": [
+ "Reading"
+ ],
+ "forge": "amadan",
+ "connection_id": "amadan",
+ "title_source": "owner",
+ "description_source": "repository"
+ }
+ ],
+ "allowed": [
+ "amadan.net/oficina/sample",
+ "amadan.net/oficina/notes"
+ ],
+ "home": "",
+ "connections": [
+ {
+ "id": "amadan",
+ "forge": "amadan",
+ "title": "Amadan",
+ "state": "connected",
+ "can_add": true
+ }
+ ],
+ "can_add": [
+ {
+ "repo": "amadan.net/oficina/notes",
+ "name": "oficina/notes",
+ "title": "Notes",
+ "description": "Notes for the team.",
+ "description_source": "repository",
+ "forge": "amadan",
+ "connection_id": "amadan"
+ }
+ ]
+}
diff --git a/native/apple/Tests/EquipoKitTests/Fixtures/project-typed-answer.json b/native/apple/Tests/EquipoKitTests/Fixtures/project-typed-answer.json
new file mode 100644
index 00000000..fc514d9c
--- /dev/null
+++ b/native/apple/Tests/EquipoKitTests/Fixtures/project-typed-answer.json
@@ -0,0 +1,41 @@
+{
+ "card": {
+ "choice": "",
+ "created_at": "2026-11-17T11:59:59.93041Z",
+ "id": "c_project",
+ "kind": "question",
+ "name": "oficina/sample",
+ "options": [],
+ "project_id": "p_dogiihcx5hlvgbhrrs7tq3eebr",
+ "question": "Which project should this go in? Type the project name or repository.",
+ "revision": 2,
+ "state": "open",
+ "task_id": "",
+ "turn_id": "t_qx3y2mwzyh5b7isafhjc6y4l4z",
+ "updated_at": "2026-11-17T11:59:59.93041Z",
+ "remember_name": "edited reader"
+ },
+ "message": {
+ "created_at": "0001-01-01T00:00:00Z",
+ "id": "",
+ "revision": 0,
+ "role": "",
+ "switched": null,
+ "text": "",
+ "turn_id": ""
+ },
+ "turn": {
+ "attempt": 0,
+ "connection": "",
+ "created_at": "0001-01-01T00:00:00Z",
+ "id": "",
+ "kind": "",
+ "message_ids": null,
+ "reason": "",
+ "reply_id": "",
+ "revision": 0,
+ "state": "",
+ "timing": null,
+ "updated_at": "0001-01-01T00:00:00Z"
+ }
+}
diff --git a/native/apple/Tests/EquipoKitTests/MarkdownStreamTests.swift b/native/apple/Tests/EquipoKitTests/MarkdownStreamTests.swift
index 1d4383ea..7b264404 100644
--- a/native/apple/Tests/EquipoKitTests/MarkdownStreamTests.swift
+++ b/native/apple/Tests/EquipoKitTests/MarkdownStreamTests.swift
@@ -10,7 +10,7 @@ import Testing
let session = EquipoSession(account: account, accounts: accounts, transport: transport)
var snapshot: Snapshot = try Fixture.decode("thin/snapshot")
var turn = try #require(snapshot.turns?.first)
- turn.state = "running"; turn.attempt = 1
+ turn.state = "running"; turn.attempt = 1; turn.replyId = ""
snapshot.turns = [turn]; snapshot.messages = []
session.apply(snapshot)
return (session, snapshot, turn.id)
@@ -46,6 +46,9 @@ import Testing
var snapshot = original
let message = ThinMessage(id: "m-finished", revision: 100, role: "coordinator", text: "```sh\nls\n```\n", turnId: id, createdAt: Date())
snapshot.messages = [message]
+ snapshot.turns?[0].replyId = message.id
+ snapshot.turns?[0].state = "replied"
+ snapshot.turns?[0].revision += 1
session.apply(snapshot)
#expect(session.drafts[id] == nil)
let finished = try #require(Feed.build(session).first { $0.reply != nil })
diff --git a/native/apple/Tests/EquipoKitTests/ProjectsTests.swift b/native/apple/Tests/EquipoKitTests/ProjectsTests.swift
new file mode 100644
index 00000000..d3972d54
--- /dev/null
+++ b/native/apple/Tests/EquipoKitTests/ProjectsTests.swift
@@ -0,0 +1,359 @@
+import Foundation
+import Testing
+@testable import EquipoKit
+
+@MainActor @Suite(.serialized) struct ProjectsTests {
+ func catalog(_ t: ScriptedTransport) -> ProjectCatalog {
+ ProjectCatalog(client: EquipoClient(transport: t, token: "fixture"), lifetime: SignInLifetime())
+ }
+ func list() throws -> ProjectList { try Fixture.decode("project-list") }
+ func response<T: Encodable>(_ value: T) throws -> Result<APIResponse, EquipoAPIError> {
+ .success(APIResponse(status: 200, data: try EquipoJSON.encoder.encode(value)))
+ }
+
+ @Test func listKeepsServerOrderAndOwnerAvailability() async throws {
+ let t = ScriptedTransport(); t.on("GET /projects", fixture: "project-list")
+ let c = catalog(t); await c.refresh()
+ #expect(c.items.map(\.id) == ["p_star", "p_recent"])
+ #expect(c.items[0].starred == true)
+ #expect(c.items[1].personalNames == nil)
+ #expect(c.available.count == 1)
+ #expect(c.connections.first?.state == "connected")
+ var member = try list(); member.connections?[0].canAdd = false
+ t.replace("GET /projects", with: try response(member)); await c.refresh()
+ #expect(c.available.isEmpty, "owner capability gates Add even if a response carries repositories")
+ }
+
+ @Test func sameRevisionPersonalEventsFollowSequenceNotSharedRevision() throws {
+ let c = catalog(ScriptedTransport()); let p = try #require(list().items?.first)
+ c.applySnapshot([p], cursor: 10)
+ var removed = p; removed.personalNames = nil
+ c.applyEvent(removed, cursor: 12)
+ c.applyEvent(p, cursor: 11)
+ c.applySnapshot([p], cursor: 10)
+ #expect(c.projects[p.id]?.personalNames == nil)
+ #expect(c.projects[p.id]?.names == ["Reading"])
+ c.applyEvent(p, cursor: 13)
+ #expect(c.projects[p.id]?.personalNames == ["my reader"])
+ var older = removed; older.revision -= 1
+ c.applyEvent(older, cursor: 14)
+ #expect(c.projects[p.id]?.revision == p.revision)
+ c.applySnapshot([removed], cursor: 15)
+ #expect(c.projects[p.id]?.personalNames == nil, "a fresh snapshot after a reconnect carries viewer fields too")
+ c.applyEvent(p, cursor: 14)
+ #expect(c.projects[p.id]?.personalNames == nil, "a snapshot cursor also rejects older replayed viewer events")
+ }
+
+ @Test func starUsesPutAndResponseCorrectsOptimism() async throws {
+ let t = ScriptedTransport(); t.on("GET /projects", fixture: "project-list")
+ let c = catalog(t); await c.refresh()
+ let p = try #require(c.items.first)
+ t.on("PUT /projects/\(p.id)/star", try response(p))
+ await c.setStar(p, false)
+ #expect(c.projects[p.id]?.starred == true)
+ let request = try #require(t.sent("PUT /projects/\(p.id)/star").first)
+ #expect(try JSONSerialization.jsonObject(with: request.body!) as? [String: Bool] == ["starred": false])
+ #expect(request.bearer == "fixture")
+ }
+
+ @Test func removeOnlyPersonalNameAndAddRepository() async throws {
+ let t = ScriptedTransport(); t.on("GET /projects", fixture: "project-list")
+ let c = catalog(t); await c.refresh()
+ let p = try #require(c.items.first)
+ t.on("DELETE /projects/\(p.id)/names", .success(APIResponse(status: 204, data: Data())))
+ await c.forgetName("my reader", in: p)
+ #expect(c.projects[p.id]?.personalNames == [])
+ #expect(c.projects[p.id]?.names == p.names)
+ #expect(c.projects[p.id]?.revision == p.revision)
+ t.on("POST /projects", try response(p))
+ await c.add(try #require(c.available.first))
+ let request = try #require(t.sent("POST /projects").first)
+ #expect(try JSONSerialization.jsonObject(with: request.body!) as? [String: String] == ["repo": "amadan.net/oficina/notes"])
+ }
+
+ @Test func messageSelectionAndExplicitRememberArePartOfRetryBody() throws {
+ let write = try EquipoClient.message("Fix it", projectID: "p_star")
+ let body = try #require(JSONSerialization.jsonObject(with: write.body) as? [String: String])
+ #expect(body["project_id"] == "p_star")
+ #expect(body["idempotency_key"] == write.key)
+ let card: ThinCard = try Fixture.decode("project-card")
+ for name in ["edited name", ""] {
+ let answer = try EquipoClient.answer("Woodstar", rememberName: name, to: card)
+ let fields = try #require(JSONSerialization.jsonObject(with: answer.body) as? [String: Any])
+ #expect(fields["remember_name"] as? String == name)
+ #expect(fields["revision"] as? Int64 == card.revision)
+ }
+ }
+
+ @Test func typed422KeepsCardAndServerNotice() async throws {
+ let t = ScriptedTransport()
+ var account = DeviceAccount.new(origin: t.origin, label: "Test")
+ account.credential = try Fixture.decode("device-credential")
+ let s = EquipoSession(account: account, accounts: DeviceAccounts(store: MemorySecretStore()), transport: t)
+ let card: ThinCard = try Fixture.decode("project-card")
+ var snapshot: Snapshot = try Fixture.decode("thin/snapshot")
+ snapshot.cards = [card]; s.apply(snapshot)
+ t.on("POST /cards/\(card.id)/answer", fixture: "project-invalid", status: 422)
+ #expect(await s.answer(card, choice: "unknown", rememberName: "") == .failed)
+ #expect(s.answerNotices[card.id] == "Check the request fields and try again.")
+ #expect(s.cards.first { $0.id == card.id } == card, "422 leaves the exact card open")
+ #expect(t.sent("POST /cards/\(card.id)/answer").count == 1)
+ }
+}
+
+private actor ProjectHeldTransport: EquipoTransport {
+ nonisolated let origin = URL(string: "https://projects.example.test")!
+ let base: ScriptedTransport
+ let route: String
+ var continuation: CheckedContinuation<Void, Never>?
+ var held = false
+ var used = false
+ init(_ base: ScriptedTransport, route: String) { self.base = base; self.route = route }
+ func send(_ request: APIRequest) async throws -> APIResponse {
+ let answer = try await base.send(request)
+ if !used && request.method + " " + request.path == route {
+ used = true; held = true
+ await withCheckedContinuation { continuation = $0 }
+ }
+ return answer
+ }
+ func release() { continuation?.resume(); continuation = nil }
+ func wait() async { while !held { await Task.yield() } }
+ func lines(_ request: APIRequest) async throws -> AsyncThrowingStream<String, Error> { try await base.lines(request) }
+}
+
+extension ProjectsTests {
+ @Test func lateListCannotRestoreViewerNames() async throws {
+ let t = ScriptedTransport(); t.on("GET /projects", fixture: "project-list")
+ let transport = ProjectHeldTransport(t, route: "GET /projects")
+ let c = ProjectCatalog(client: EquipoClient(transport: transport, token: "fixture"), lifetime: SignInLifetime())
+ let read = Task { await c.refresh() }; await transport.wait()
+ var updated = try list(); updated.items?[0].personalNames = nil
+ let removed = try #require(updated.items?.first)
+ c.applyEvent(removed, cursor: 100)
+ t.replace("GET /projects", with: try response(updated))
+ await transport.release(); await read.value
+ #expect(c.projects[removed.id]?.personalNames == nil)
+ #expect(t.sent("GET /projects").count == 2, "the stale response triggers one fresh read")
+ }
+ @Test func optimisticStarRollsBackRefusalAndDepartedReadsCannotPublish() async throws {
+ let t = ScriptedTransport(); t.on("GET /projects", fixture: "project-list")
+ let c = catalog(t); await c.refresh()
+ let p = try #require(c.items.first)
+ t.on("PUT /projects/\(p.id)/star", .failure(.offline))
+ let transport = ProjectHeldTransport(t, route: "GET /projects")
+ let departed = ProjectCatalog(client: EquipoClient(transport: transport, token: "fixture"), lifetime: SignInLifetime())
+ let read = Task { await departed.refresh() }; await transport.wait()
+ departed.lifetime.end(); await transport.release(); await read.value
+ #expect(!departed.loaded && departed.items.isEmpty)
+ await c.setStar(p, false)
+ #expect(c.projects[p.id]?.starred == p.starred)
+ #expect(c.notice == "Couldn’t reach your team. Try again.")
+ }
+ @Test func starIsOptimisticWhileServerIsHeld() async throws {
+ let t = ScriptedTransport(); t.on("GET /projects", fixture: "project-list")
+ let p = try #require(list().items?.first)
+ t.on("PUT /projects/\(p.id)/star", try response(p))
+ let transport = ProjectHeldTransport(t, route: "PUT /projects/\(p.id)/star")
+ let c = ProjectCatalog(client: EquipoClient(transport: transport, token: "fixture"), lifetime: SignInLifetime())
+ await c.refresh()
+ let write = Task { await c.setStar(p, false) }; await transport.wait()
+ #expect(c.projects[p.id]?.starred == false)
+ #expect(c.pending.contains(p.id))
+ await transport.release(); await write.value
+ #expect(c.projects[p.id]?.starred == true)
+ }
+ @Test func failedProjectSendKeepsItsNoticeAndRetrySelection() async throws {
+ for (status, code) in [(404, "not_found"), (422, "repo_not_allowed")] {
+ let t = ScriptedTransport()
+ var account = DeviceAccount.new(origin: t.origin, label: "Test")
+ account.credential = try Fixture.decode("device-credential")
+ let s = EquipoSession(account: account, accounts: DeviceAccounts(store: MemorySecretStore()), transport: t)
+ let data = Data("{\"code\":\"\(code)\",\"copy_key\":\"api.\(code)\",\"request_id\":\"fixture\"}".utf8)
+ t.on("POST /messages", .success(APIResponse(status: status, data: data)))
+ await s.send("Fix this", projectID: "p_star")
+ let outgoing = try #require(s.outgoing.first)
+ #expect(outgoing.state == .failed)
+ #expect(outgoing.notice == EquipoStrings.text(String.LocalizationValue("api." + code)))
+ await s.retry(outgoing.id)
+ let requests = t.sent("POST /messages")
+ #expect(requests.count == 2)
+ #expect(requests[0].body == requests[1].body)
+ let fields = try #require(JSONSerialization.jsonObject(with: requests[0].body!) as? [String: String])
+ #expect(fields["project_id"] == "p_star")
+ }
+ }
+}
+
+#if os(macOS)
+import AppKit
+import SwiftUI
+@testable import EquipoMac
+
+extension ProjectsTests {
+ @Test func macPlacementCardHasAResizableHostAndRetainsItDuringFeedUpdates() async throws {
+ let t = ScriptedTransport()
+ var account = DeviceAccount.new(origin: t.origin, label: "Test")
+ account.credential = try Fixture.decode("device-credential")
+ let session = EquipoSession(account: account, accounts: DeviceAccounts(store: MemorySecretStore()), transport: t)
+ var card: ThinCard = try Fixture.decode("project-card")
+ let byline = RosterByline(who: .coordinator, verb: "asks", project: nil, time: nil)
+ let view = LiveTranscript(session: session, openTask: { _ in })
+ view.frame = NSRect(x: 0, y: 0, width: 600, height: 800)
+ let window = NSWindow(contentRect: view.frame, styleMask: [.borderless], backing: .buffered, defer: false)
+ window.contentView = view
+ defer { window.contentView = nil }
+ view.update(items: [.question(card, byline)])
+ view.layoutSubtreeIfNeeded()
+ let document = try #require(view.subviews.compactMap { $0 as? NSScrollView }.first?.documentView)
+ let row = try #require(document.subviews.first)
+ let host = try #require(row.subviews.first { String(reflecting: type(of: $0)).contains("QuestionCardHost") })
+ let height = row.frame.height
+ #expect(height > 150)
+ card.revision += 1
+ card.question = String(repeating: "Which project should this go in? ", count: 25)
+ view.update(items: [.question(card, byline)])
+ view.layoutSubtreeIfNeeded()
+ try await Task.sleep(for: .milliseconds(100))
+ #expect(host.superview === row)
+ #expect(row.frame.height > height)
+ #expect(host.frame.maxY < row.frame.height)
+ }
+}
+#endif
+
+extension ProjectsTests {
+ @Test func releasedSelectionNoticeDoesNotHideStreamingReplyOrShareItsIdentity() async throws {
+ let t = ScriptedTransport()
+ var account = DeviceAccount.new(origin: t.origin, label: "Test")
+ account.credential = try Fixture.decode("device-credential")
+ let session = EquipoSession(account: account, accounts: DeviceAccounts(store: MemorySecretStore()), transport: t)
+ var snapshot: Snapshot = try Fixture.decode("thin/snapshot")
+ let turn = try #require(snapshot.turns?.first { $0.isLive })
+ var notice = try #require(snapshot.messages?.first)
+ notice.id = "selection-notice"; notice.role = "coordinator"; notice.turnId = turn.id
+ notice.text = EquipoStrings.text("projects.selection_lost")
+ session.apply(snapshot)
+ await session.handle("data: {\"type\":\"delta\",\"resource\":\"turn\",\"attempt\":1,\"data\":{\"turn_id\":\"\(turn.id)\",\"offset\":0,\"text\":\"Working\"}}")
+ snapshot.messages?.append(notice); session.apply(snapshot)
+ #expect(session.drafts[turn.id]?.text == "Working")
+ await session.handle("data: {\"type\":\"delta\",\"resource\":\"turn\",\"attempt\":1,\"data\":{\"turn_id\":\"\(turn.id)\",\"offset\":7,\"text\":\" on it\"}}")
+ #expect(session.drafts[turn.id]?.text == "Working on it")
+ var reply = notice; reply.id = "finished-reply"; reply.text = "I found a project."
+ snapshot.messages?.append(reply)
+ let index = try #require(snapshot.turns?.firstIndex { $0.id == turn.id })
+ snapshot.turns?[index].state = "replied"
+ snapshot.turns?[index].replyId = reply.id
+ session.apply(snapshot)
+ let feed = Feed.build(session)
+ #expect(feed.contains { $0.reply?.text == notice.text })
+ #expect(feed.contains { $0.reply?.text == reply.text })
+ #expect(Set(feed.map(\.id)).count == feed.count)
+ #expect(session.drafts[turn.id] == nil)
+ }
+}
+
+extension ProjectsTests {
+ @Test func chooseAnotherKeepsOpenCardWithNewRevisionAndNoTurn() async throws {
+ let t = ScriptedTransport()
+ var account = DeviceAccount.new(origin: t.origin, label: "Test")
+ account.credential = try Fixture.decode("device-credential")
+ let session = EquipoSession(account: account, accounts: DeviceAccounts(store: MemorySecretStore()), transport: t)
+ var card: ThinCard = try Fixture.decode("project-card")
+ card.options = ["Woodstar", "Choose another project"]
+ t.on("POST /cards/\(card.id)/answer", fixture: "project-typed-answer")
+ #expect(await session.answer(card, choice: "Choose another project", rememberName: "edited reader") == .answered)
+ let updated = try #require(session.cards.first)
+ #expect(updated.isOpen && (updated.options ?? []).isEmpty)
+ #expect(updated.revision == card.revision + 1)
+ #expect(updated.rememberName == "edited reader")
+ #expect(session.turns.isEmpty)
+ t.replace("POST /cards/\(card.id)/answer", with: .success(APIResponse(status: 422, data: Fixture.data("project-invalid"))))
+ _ = await session.answer(updated, choice: "no match", rememberName: "")
+ let fields = try #require(JSONSerialization.jsonObject(with: t.sent("POST /cards/\(card.id)/answer").last!.body!) as? [String: Any])
+ #expect(fields["revision"] as? Int64 == updated.revision)
+ #expect(fields["choice"] as? String == "no match")
+ #expect(fields["remember_name"] as? String == "")
+ #expect(session.cards.first == updated)
+ }
+}
+
+extension ProjectsTests {
+ @Test func aReadStartedBeforeNameRemovalCannotRestoreItBeforeTheEventArrives() async throws {
+ let t = ScriptedTransport(); t.on("GET /projects", fixture: "project-list")
+ let c = catalog(t); await c.refresh()
+ let p = try #require(c.items.first)
+ let started = c.snapshotGeneration
+ t.on("DELETE /projects/\(p.id)/names", .success(APIResponse(status: 204, data: Data())))
+ await c.forgetName("my reader", in: p)
+ c.applySnapshot([p], cursor: 100, generation: started)
+ #expect(c.projects[p.id]?.personalNames == [])
+ }
+ @Test func sessionDecodesSameRevisionProjectEventsInSequence() async throws {
+ let t = ScriptedTransport()
+ var account = DeviceAccount.new(origin: t.origin, label: "Test")
+ account.credential = try Fixture.decode("device-credential")
+ let session = EquipoSession(account: account, accounts: DeviceAccounts(store: MemorySecretStore()), transport: t)
+ let p = try #require(list().items?.first)
+ session.projectCatalog.applySnapshot([p], cursor: 10)
+ var removed = p; removed.personalNames = nil
+ func event(_ p: ThinProject, _ cursor: Int) throws -> String {
+ let data = try JSONSerialization.jsonObject(with: EquipoJSON.encoder.encode(p))
+ return "data: " + String(decoding: try JSONSerialization.data(withJSONObject: ["cursor": cursor, "type": "project", "resource": "project", "data": data]), as: UTF8.self)
+ }
+ await session.handle(try event(removed, 12))
+ await session.handle(try event(p, 11))
+ #expect(session.projects[p.id]?.personalNames == nil)
+ #expect(session.projects[p.id]?.names == p.names)
+ #expect(session.cursor == 12)
+ }
+}
+
+#if os(macOS)
+extension ProjectsTests {
+ @Test func projectViewsFitPhoneWidthAndAccessibilityType() async throws {
+ let t = ScriptedTransport(); t.on("GET /projects", fixture: "project-list")
+ var account = DeviceAccount.new(origin: t.origin, label: "Test")
+ account.credential = try Fixture.decode("device-credential")
+ let s = EquipoSession(account: account, accounts: DeviceAccounts(store: MemorySecretStore()), transport: t)
+ s.apply(try Fixture.decode("thin/snapshot")); await s.projectCatalog.refresh()
+ s.projectCatalog.selection = try #require(s.projectCatalog.items.first)
+ let card: ThinCard = try Fixture.decode("project-card")
+ for width in [390.0, 760.0] {
+ for type in [DynamicTypeSize.large, .accessibility3] {
+ let view = VStack(alignment: .leading, spacing: 20) {
+ ProjectSummary(project: s.projectCatalog.items[0])
+ ProjectSelectionChip(catalog: s.projectCatalog)
+ LiveQuestionCard(card: card, taskTitle: nil, session: s)
+ }.padding(16).frame(width: width).environment(\.dynamicTypeSize, type)
+ .environment(\.colorScheme, .light).background(.white)
+ let host = NSHostingView(rootView: view)
+ host.frame.size = host.fittingSize
+ let window = NSWindow(contentRect: host.frame, styleMask: [.borderless], backing: .buffered, defer: false)
+ window.contentView = host
+ host.layoutSubtreeIfNeeded()
+ try await Task.sleep(for: .milliseconds(30))
+ host.displayIfNeeded()
+ #expect(abs(host.frame.width - width) < 1)
+ #expect(host.frame.height > 250 && host.frame.height < 2400)
+ if let directory = ProcessInfo.processInfo.environment["EQUIPO_PROJECT_SCREENSHOTS"] {
+ let bitmap = try #require(host.bitmapImageRepForCachingDisplay(in: host.bounds))
+ host.cacheDisplay(in: host.bounds, to: bitmap)
+ let file = URL(filePath: directory).appendingPathComponent("projects-\(Int(width))-\(type).png")
+ try FileManager.default.createDirectory(at: file.deletingLastPathComponent(), withIntermediateDirectories: true)
+ try bitmap.representation(using: .png, properties: [:])?.write(to: file)
+ }
+ window.contentView = nil
+ }
+ }
+ }
+}
+#endif
+
+extension ProjectsTests {
+ @Test func ownerEditOpensTheEngineProjectPageContainingTheRevisionForm() throws {
+ let c = catalog(ScriptedTransport())
+ let project = try #require(list().items?.first)
+ #expect(c.detailsURL(project).absoluteString == "https://oficina.example.test/projects/p_star")
+ }
+}
diff --git a/native/scripts/check-fixtures.py b/native/scripts/check-fixtures.py
index 60604185..3b71e856 100755
--- a/native/scripts/check-fixtures.py
+++ b/native/scripts/check-fixtures.py
@@ -18,6 +18,7 @@ root = Path(__file__).resolve().parents[2]
spec = json.loads((root / 'docs/api/equipo-v1.openapi.json').read_text())
fixtures = root / 'native/apple/Tests/EquipoKitTests/Fixtures'
contracts = {
+ 'project-typed-answer': 'Answered', 'project-list': 'ProjectList', 'project-card': 'Card', 'project-invalid': 'Error',
'me': 'PersonAPIMe', 'ack': 'Ack', 'device-challenge': 'PersonDeviceChallenge',
'device-credential': 'PersonCredential', 'devices': 'DevicePage',
'error-revision-conflict': 'Error', 'error-pending': 'Error',
diff --git a/native/scripts/check-parity.py b/native/scripts/check-parity.py
index 26612204..ffeb96ef 100755
--- a/native/scripts/check-parity.py
+++ b/native/scripts/check-parity.py
@@ -19,12 +19,12 @@ for pattern in (r'chat\.card\.merge_chose_\w+', r'chat\.card\.ships_chose_\w+'):
if key not in strings:
problems.append(f'{key}: the web has this outcome; native has no words for it')
for key, text in sorted(strings.items()):
- if not key.startswith(('chat.card.', 'chat.paste.', 'work.tl.', 'roster.', 'api.')):
+ if not key.startswith(('chat.card.', 'chat.paste.', 'work.tl.', 'roster.', 'projects.', 'work.star.', 'api.', 'nav.projects', 'chat.connections.connected', 'counts.unavailable')):
continue
found = re.findall(r'"' + re.escape(key) + r'":\s*"((?:[^"\\]|\\.)*)"', copy)
if len(found) != 1:
problems.append(f'{key}: found {len(found)} times in copy.go, expected once'); continue
- web = json.loads('"' + found[0] + '"')
+ web = json.loads('"' + found[0] + '"').replace('%s', '%@')
checked += 1
if web != text:
problems.append(f'{key}: native says {text!r}, the web says {web!r}')
diff --git a/native/scripts/strings.json b/native/scripts/strings.json
index 7681a149..7be7e067 100644
--- a/native/scripts/strings.json
+++ b/native/scripts/strings.json
@@ -39,6 +39,7 @@
"card.offline": "Couldn’t reach your team. Try again.",
"card.open_on_web": "Open in Equipo on the web",
"card.question": "Question",
+ "chat.card.answer": "Answer",
"chat.card.merge": "Merge",
"chat.card.merge_chose_merge": "Merging without checks.",
"chat.card.merge_chose_not_now": "Not now.",
@@ -54,6 +55,7 @@
"chat.card.ships_chose_ships": "Merging to main ships to users, so I'll ask before merging without checks.",
"chat.card.wait": "Wait for checks",
"chat.card.wait_mac": "Wait for a Mac",
+ "chat.connections.connected": "%@ connected",
"chat.paste.command": "Command",
"chat.paste.copied": "Copied",
"chat.paste.copy": "Copy",
@@ -73,6 +75,7 @@
"composer.send": "Send",
"conversation.empty": "Say what you want done. Your coordinator picks the project and tells you, and you can change it.",
"conversation.placeholder": "Message",
+ "counts.unavailable": "Unavailable",
"decision.on_web": "For now you make this decision on the web, where its full context is.",
"decision.untitled": "A decision",
"device.mac": "Mac",
@@ -83,6 +86,7 @@
"message.own_spoken %@": "You said: %@",
"message.sending": "Sending…",
"message.waiting": "Waiting for a connection. Try again.",
+ "nav.projects": "Projects",
"needs.count %lld": "%lld waiting for you",
"needs.count_spoken %lld": "%lld waiting for you",
"needs.empty": "Questions and decisions for you appear here.",
@@ -117,6 +121,24 @@
"pairing.welcome_title": "Equipo",
"pairing.your_code": "Your code",
"project.spoken %@": "Project %@",
+ "projects.add_reachable": "Add project",
+ "projects.can_add": "Available to add",
+ "projects.description": "Description",
+ "projects.details": "Project details",
+ "projects.edit": "Edit project",
+ "projects.empty": "No projects yet.",
+ "projects.forget_name": "Remove this name",
+ "projects.name_question": "Which project should this go in? Type the project name or repository.",
+ "projects.name_to_remember": "Name to remember",
+ "projects.names": "Names people use",
+ "projects.new_request": "New request",
+ "projects.other": "Choose another project",
+ "projects.personal_names": "Your names for this project",
+ "projects.remember_name": "Remember '%@' for this project",
+ "projects.remove_selection": "Remove project",
+ "projects.selection_lost": "The selected project is no longer available. This request will continue without a project.",
+ "projects.title": "Title",
+ "projects.yours": "Your projects",
"question.answered %@": "You answered: %@",
"question.closed": "This question is no longer open.",
"read.failed": "Your team answered, but not with what this screen needs. Try again in a moment.",
@@ -191,5 +213,7 @@
"thread.sent": "Sent",
"track.position %@ %@": "%1$@ of %2$@",
"track.spoken %@": "Stage: %@",
+ "work.star.add": "Star %@",
+ "work.star.remove": "Unstar %@",
"work.tl.merge_dropped": "An earlier attempt to add this change was dropped when the task became an exploration."
}