Files
sanderling/Makefile
T
pj 776becdf4b Remove in-app SDK (#43)
* chore: delete internal/agent package

* chore(build): remove sdk-android from gradle settings

* chore(makefile): remove sdk-android targets

* chore(ci): remove release-android job from release workflow

* chore(folio): remove sdk-android dependency

* chore(folio): remove SDK initialization from FolioApplication

* chore(folio): delete snapshot extractor files

* feat(folio): add balance to account card content description

* feat(folio): add hierarchy content descriptions to LedgerScreen

* refactor(folio): rewrite spec.ts to use ax extractors

* docs: remove in-app SDK from README

* feat(folio): add focused_input indicator to App

* docs: remove in-app SDK from index

* refactor(runner): remove agent SDK connection and snapshot step

* test(runner): update tests for SDK removal

* docs: remove Android SDK section from getting-started

* refactor(testrun): remove agent SDK connection setup

* docs: remove snapshots from writing-specs

* docs: remove in-app SDK from architecture doc

* docs(folio): update README for SDK removal

* docs: update per-step cycle diagram in architecture doc

* fix(folio): detect screens from unique element presence, not id: selectors

testTag() in Compose is not exposed as resource-id without testTagsAsResourceId.
Use desc: selectors for elements unique to each screen instead of id: path queries.

* feat(folio): add screen root contentDescription for scoped ax selection

Each screen root gets semantics { contentDescription = "ScreenName" } so
sanderling specs can scope element lookups through the screen: desc:LoginScreen > desc:login_submit.

* fix(folio): scope all ax selectors through screen root nodes

Use desc:ScreenName > desc:element path queries so every selector is
rooted at the screen level. focusedInput stays unscoped since it lives
in the app root, outside any screen.

* fix(folio): guard newAccountBalanceIsZero against navigation false positives

Scoped selectors return [] when not on HomeScreen so accounts vanish and
reappear as apparently-new on each visit. Skip the check when prev was empty.

* chore(folio): link @sanderling/spec to local pkg/spec for IDE type checking

* feat(spec): add desc, class, clickable, enabled, checked, focused, selected to AccessibilityElement

Runtime fields set by the verifier were missing from the TypeScript type,
causing linting errors on el.desc and related accesses in specs.

* chore(folio): switch to bun, add tsconfig.json for IDE type checking

- Remove package-lock.json, add bun.lock
- Add tsconfig.json so VSCode resolves @sanderling/spec types
- Fix parseAccount/parseLedgerRow to accept string | undefined
2026-04-25 20:04:29 +07:00

116 lines
3.2 KiB
Makefile

SHELL := /bin/bash
ANDROID_HOME ?= /opt/homebrew/share/android-commandlinetools
GRADLE := ./gradlew
GO := go
BUF := buf
GO_PACKAGES := ./...
SIDECAR_JAR := sidecar/build/libs/sidecar-all.jar
SIDECAR_EMBED := internal/sidecar/assets/sidecar-all.jar
SANDERLING_BIN := bin/sanderling
DOCS_SRC := $(shell find docs -type f -name '*.md' -not -path 'docs/_*')
INDEX_SRC := $(filter %index.md,$(DOCS_SRC))
PAGE_SRC := $(filter-out %index.md,$(DOCS_SRC))
INDEX_OUT := $(patsubst docs/%.md,build/site/%.html,$(INDEX_SRC))
PAGE_OUT := $(patsubst docs/%.md,build/site/%/index.html,$(PAGE_SRC))
DOCS_OUT := $(INDEX_OUT) $(PAGE_OUT)
DOCS_TEMPLATE := docs/_template/page.html
INSPECT_DIST := internal/inspect/dist
WEB_DIST := inspect-ui/dist
.PHONY: bootstrap proto sidecar sanderling install test test-go test-kotlin test-spec-api web-typecheck web-build web-dev inspect-dev docs clean release-cli release-npm-dry
bootstrap:
$(GO) mod download
$(BUF) generate
cd pkg/spec && npm install --silent
proto:
$(BUF) lint
$(BUF) generate
sidecar: $(SIDECAR_JAR)
sanderling: $(SANDERLING_BIN)
$(SANDERLING_BIN): $(SIDECAR_EMBED) web-build
mkdir -p bin
$(GO) build -tags withsidecar -o $(SANDERLING_BIN) ./cmd/sanderling
# Installs `sanderling` into $GOBIN (or $GOPATH/bin) so it's directly on PATH for
# anyone with a standard Go toolchain setup.
install: $(SIDECAR_EMBED) web-build
$(GO) install -tags withsidecar ./cmd/sanderling
@dest="$$($(GO) env GOBIN)"; [ -n "$$dest" ] || dest="$$($(GO) env GOPATH)/bin"; echo "installed sanderling to $$dest"
web-build:
cd inspect-ui && bun install --frozen-lockfile && bun run build
mkdir -p $(INSPECT_DIST)
rm -rf $(INSPECT_DIST)/assets $(INSPECT_DIST)/fonts
cp -R $(WEB_DIST)/. $(INSPECT_DIST)/
web-dev:
cd inspect-ui && bun run dev
inspect-dev: $(SIDECAR_EMBED)
$(GO) run -tags withsidecar ./cmd/sanderling inspect --dev
web-typecheck:
cd inspect-ui && bun install --frozen-lockfile && bun run typecheck
$(SIDECAR_JAR):
ANDROID_HOME=$(ANDROID_HOME) $(GRADLE) :sidecar:shadowJar
$(SIDECAR_EMBED): $(SIDECAR_JAR)
mkdir -p $(dir $@)
cp $< $@
test: test-go test-spec-api web-typecheck
test-go:
$(GO) test $(GO_PACKAGES)
test-kotlin:
ANDROID_HOME=$(ANDROID_HOME) $(GRADLE) :sidecar:test
test-spec-api:
cd pkg/spec && npm test --silent
docs: $(DOCS_OUT) build/site/_assets
@echo "built $(words $(DOCS_OUT)) pages to build/site"
build/site/_assets: docs/_assets
@mkdir -p build/site
@rm -rf $@
@cp -R $< $@
define build_page
@mkdir -p $(dir $@)
@pandoc $< --from=gfm --to=html5 --standalone \
--highlight-style=tango --template=$(DOCS_TEMPLATE) -o $@
@rel=$$(echo $(patsubst build/site/%,%,$@) | awk -F/ '{for(i=1;i<NF;i++)printf "../"}'); \
sed -i.bak "s|__ROOT__|$$rel|g" $@ && rm $@.bak
endef
$(INDEX_OUT): build/site/%.html: docs/%.md $(DOCS_TEMPLATE)
$(build_page)
$(PAGE_OUT): build/site/%/index.html: docs/%.md $(DOCS_TEMPLATE)
$(build_page)
clean:
$(GO) clean
rm -rf bin dist pkg/spec-api/dist build/site
$(GRADLE) clean
# Local release dry-runs. None of these touch remote registries.
release-cli: $(SIDECAR_JAR)
goreleaser release --snapshot --clean
release-npm-dry:
cd pkg/spec && npm ci && npm run build && npm pack --dry-run