Import the design system, observability and icon modules from fjord-android (GRD-498) #1
Loading…
Reference in a new issue
No description provided.
Delete branch "import-from-fjord-android"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
GRD-498, step A5 (plan:
grd-plans/grid-android-plan.md, issue A). The first import of the Android kit: the three modules fjord-android extracted locally in A0 to A4b, as one clean commit that names its source.Source: rasterstate/fjord-android
mainat87ba0f8cd::designsystem(A2, #1475),:observability(A4 #1480, A4b #1481) and:fjordicons. The first commit imports them as they were at0c2644f3con the A4b branch; the mergedmaindiffers from it only by the classifier rename that #1481's CI required (the kit carries the same rename in its own commit), onePreviewSurfacecomment, and the module build files (:fjordiconsis:iconshere, plus a test dependency). Nothing else differs, checked file by file.Layout
designsystem/,observability/: moved unchanged, packages included (com.rasterstate.fjord.ui.*,com.rasterstate.fjord.observability), so the app's imports did not move. Namespacessh.fjord.kit.designsystemandsh.fjord.kit.observability; the package rename is a later release.icons/(sh.fjord.icons,:fjordiconsrenamed): generated, not copied by hand.Scripts/update-icons.shtakes the union ofConfig/icons-usage/*.json(today onlyfjord-android.json, the 149 keys fjord-android ships), runspackage_usage.pyfrom the pinnedfjord-iconscommit and syncsdist/fjord-android-kit/android. I ran it: the output equals fjord-android'sfjordiconsmodule byte for byte (298 icons, five densities); only the app slug inmanifest.jsondiffers. Grid's list lands in its own file when its app exists.Scripts/check_icons_usage.pyfails when a listed icon is missing, an unlisted icon is carried, ormanifest.json,FjordIcons.javaand the five drawable densities disagree. Its tests run in CI.group = sh.fjord.kiton every module so a host canincludeBuildthis repo and depend onsh.fjord.kit:designsystem(composite build first, as decided; a registry later)..forgejo/workflows/ci.yml): the same heavy Linux pool, JDK 17 and Android SDK from the package registry, thenspotlessCheck,detekt,assembleDebug assembleRelease testDebugUnitTest lintDebug; a second job runs the icon check on the light pool. No publish workflow yet: with a composite build there is nothing to publish.FailureScrubberTestwith a kit-localOperatedHostsRule,SentryEventScrubberTest,SentryDeviceRoleTest,SentryCrashSinkTest,BuildDistributionTest,AppOpenedTelemetryTest) plusObservabilityConfigurationTest(release name, fail-closed default, the https-only guard, the scrubber keeping only operated-host paths). They still exist in fjord-android; A6 deletes them there.ObservabilityConfiguration,AnalyticsSettings,FailureFacts, the Sentry version), the icon flow and the build prerequisites.Commits. (1) the import, unchanged from the source; (2) the four files over the 200-line limit split, and the scrubber test too (
Theme327 intoTheme,ThemeColors,SystemBars;CrashSink332 into the interface and no-op,SentryCrashSinkandSentryPrivacyPolicy;ForgePaths209 hands the web path rules toForgeWebPaths;LayoutPolicyTest286 andFailureScrubberTest448 split by area;LocalStatusBarIconPinsandSystemBarIconsbecameinternalinstead ofprivatesoTheme.ktcan reach them; no behaviour change); (3) the source-size check adopted (the vendored checker at fjord-android's pin, its workflow,AGENTS.md, a config excluding only the generated icon sources and the Gradle wrapper script; no baseline, nothing is over the limit: the checker passes locally with 0 failures, 10 advisory warnings); (4) leftover imports.Not in this PR
SentryInstallIdTest,SentryCrashSinkOptionsTest,SentryCrashSinkRoleTest,LaunchTraceTest,SystemLocaleCountryTest,CrashReporterTest) stay in fjord-android for now: they need the Robolectric runtime staging fjord-android's CI has. Moving them, and the staging, is part of A6 or a small follow-up before it, so the code that decides what leaves the device is guarded in the kit..source-size/yet); the first PR after the merge proves it on the intended runner, as the adoption notes require. A tag:0.1.0is for the lead to push once main is green.No Gradle on the host that wrote this, so nothing here has been built yet: the build,
spotlessCheck,detekt,lintDebugand the unit tests are for this PR's first CI run, which is also the first time the kit builds on its own. Self-review read only part of the 1,581-file diff (the PNGs and generated Java are most of it) and found nothing blocking; its lows (a thin test set, two comments, the JDK download timeout) are addressed above.Failure paths: n/a, an import with no new state.
Known edge cases (follow-up): the Robolectric tests and the source-size baseline, above.
Automated Codex review (read-only) of head
4217ac93ba.I found nothing at high or medium severity.
I did not see the end of the diff. It was cut off inside
icons/manifest.json, so the remaining manifest entries, the icon PNGs and the generatedFjordIcons.javawere not in front of me. The observability sources and tests and theobservabilityGradle file were also cut off, so I read the observability sources andobservability/build.gradle.ktsfrom the checkout. I did not build anything (no Gradle or SDK here), so build,spotlessCheck,detekt,lintDebugand the unit tests remain unproven until CI runs.What I checked
Source-size pin: the
SOURCE_SIZE_PINinsource-size.ymlequals the sha256 of the vendoredSHA256SUMS, and every listed tool file matches its hash.Observability split: I diffed the first import against the head for
CrashSinktoSentryCrashSinkandSentryPrivacyPolicy, and forForgePathstoForgeWebPaths. The moved code is verbatim, including the Sentry hardening options and the 2000 ms fatal flush. TheREDACTED_*constants moved to file level, andForgePathsnow callsForgeWebPaths.redact. Nothing else references the oldredactWebPathor the old constant names.Dependencies and wiring:
settings.gradle.ktsincludes all three modules, anddesignsystemexposes:iconsthroughapi.Icon scripts: the union, check and update logic and its tests are consistent with each other. The CI
iconsjob runs the tests and the check from the repo root.Low (unchanged, by reference): the
source sizeworkflow cannot run on this PR because the base has no.source-size/. STANDARDS requires proving a new workflow on a real PR run, and the PR body defers that to the first PR after the merge. Ifsource sizeis a required check onmain, expect that first follow-up PR to be the real test. Also confirmpolicy/lint-workflow-bash.shwas run againstsource-size.yml.Low (unchanged, by reference): the Robolectric tests, which guard what leaves the device, stay in fjord-android until A6. The PR body already lists this as a known edge case. Until they move, the kit's scrubber and Sentry sink are only guarded by the pure tests.
BLOCKING: 0
Reviewed head
4217ac93baat 2026-11-19T17:05:37Z by claude -p, read-only tools (Codex unavailable).Automated Codex review (read-only) of head
c0a50b88c3.No high or medium findings. I read the diff but could not build anything, and the diff was truncated.
Not seen: the diff was cut at 400,000 of 1,078,303 bytes. I did not see the rest of the
icons/manifest.jsonentries, the PNG drawables or the generatedFjordIcons.java. Theobservabilitymodule, its tests and thedesignsystemfonts are outside the diff text I was given, so I read the mainobservabilityfiles from the checkout instead. I readObservabilityConfiguration.ktand its test in full. For the rest I only grepped for Android API use. I did not openFailureScrubber,SentryCrashSinkor the other privacy-relevant code. Nothing was built, so Gradle, detekt and lint are untested; the PR body already says so.What I checked:
check_icons_usage.pyandicons_union.pyagree with each other and with their tests.The unit tests in
observabilitydo not take an AndroidContextand use no Android framework calls beyond static fields, so they should run on the plain JVM without Robolectric.ObservabilityConfigurationTestdoes exercise what its names claim: fail-closed default, https-only guard, operated-host path scrubbing.Those tests change global state in
ObservabilityConfiguration.current, but they restore it afterwards, and Gradle runs them one after another by default.update-icons.shusesrsync --deleteonicons/. That is safe only because the generated output includesicons/build.gradle.kts, which the PR says it does.Low
.forgejo/workflows/source-size.yml:1(STANDARDS "Source file size"): the standard requires proving the workflow on the repo's own runner before merge. This PR cannot do that, becausepull_request_targetruns the workflow frommain, which has no.source-size/yet. The PR body discloses this and defers to the first PR after merge. The risk is that a bug in the workflow or the pin only shows up after merge and then fails every later PR, and that a required "source size" check never reports on this PR. Fix: ask the lead to approve the bootstrap explicitly, and have a trivial follow-up PR ready to prove it right after merge.Low (edge case)
.forgejo/scripts/install-android-sdk.sh:51-76: the script is not safe to re-run. If a runner keeps$HOME/android-sdkbetween jobs,unziphits existing files and prompts, and themv ... lateststep nests the directory. This only matters on a non-ephemeral runner, and the script is copied from fjord-android. Fix: addunzip -oq, andrm -rf "$SDK/cmdline-tools/latest"before themv.Low
designsystem/build.gradle.kts:41andobservability/build.gradle.kts:34: the Compose, material3 and okhttp dependencies areimplementation, but public types expose them (ColorSchemeinDesignTheme,okhttp3.InterceptorinHttpsOnlyGuard). A host that includeBuilds the kit and does not declare those libraries itself will not compile against them. fjord-android has them, so this is harmless today. Grid may not, so switch those toapiwhen Grid adopts the kit.BLOCKING: 0
Reviewed head
c0a50b88c3at 2026-11-19T17:51:31Z by claude -p, read-only tools (Codex unavailable).Automated Codex review (read-only) of head
4556ca5949.Review is done, with one blocking finding. I read the diff up to the truncation point (partway through
icons/manifest.json). I didn't see the rest of that manifest or the drawables andFjordIcons.java, so those are unreviewed. I read the observability sources from the checkout instead. I couldn't run Python, Gradle or ktlint here, so everything below comes from reading the code.High
designsystem/src/test/java/com/rasterstate/fjord/ui/layout/LayoutPolicyShellTest.kt:3spotlessCheck, and CI runs it first. The ktlintno-unused-importsrule is part ofktlint_official.LayoutPolicyTestleftimport androidx.compose.ui.unit.dpin the Shell test, and nothing in that file uses it. The onlydphits are in comments and strings ("a dp too narrow"). TheDpSizeand.dpusage moved toLayoutTestWindows.kt. Commit 4 ("Drop the imports the split left unused") missed this one../gradlew spotlessCheckfails on this file, so thebuildjob stops at the first gate and detekt, assemble, tests and lint never run. The PR says nothing has been built yet, so this red is visible on the first run.FailureScrubber*Testfiles,LayoutPolicyWorkItemTest,LayoutPolicyWorkstationTest) for the same leftover. Runnice -n 19 ~/fleet-week/ktlint.sh <worktree> origin/mainon the changed files and commit whatever it reports.Low
designsystem/src/main/java/com/rasterstate/fjord/ui/layout/LayoutPolicy.kt:16andLayoutPolicyShellTest.kt:108[LayoutPolicyTest], which the split removed. The test comment points atReviewWorkstationRestorationTest, which isn't in this kit.Low
.forgejo/workflows/source-size.yml.source-size/. That is unavoidable for a bootstrap PR. The proof is deferred to the first PR after merge and is already listed in the PR body.policy/lint-workflow-bash.shon the workflow, since the body doesn't mention it.Everything else I checked looks fine for normal operation. The observability code is a straight move. The Sentry privacy policy is intact. The manifest sets
io.sentry.auto-init=falseand a host's own value wins. The tests I read use onlyio.sentrytypes and pure JVM logic, so they shouldn't need Robolectric.BLOCKING: 1
Reviewed head
4556ca5949at 2026-11-19T18:28:42Z by claude -p, read-only tools (Codex unavailable).Automated Codex review (read-only) of head
1e8049b27f.I could only partly review this PR. The diff was cut at
icons/manifest.json, so I did not see the icon PNGs,FjordIcons.java, the observability and designsystem tests past what the diff showed, or anyobservability/Kotlin sources. I read those sources and.source-size/tool/SHA256SUMSin the checkout instead. Nothing was built or run. The listed observability sources are all at most 199 lines, and the pin insource-size.ymlmatches theSHA256SUMShash. I found nothing that will plausibly break in normal operation.Low,
.forgejo/workflows/source-size.yml(whole file). Invariant: STANDARDS "Source file size" says a workflow adopted in a repo must be proven by a real PR run on that repo's runner before merge, andpolicy/lint-workflow-bash.shmust be run on it. The PR body says the workflow cannot run here because the base has no.source-size/, and it does not mention the lint.actions/checkout@v6also differs from the@v4thatci.ymluses, and I could not check that the runner mirror carries it. Scenario: if the workflow has a defect (a missingshasum, an unavailable action version), the first PR after merge fails the source size check, and a required check would block every PR until someone fixes it. Fix: runpolicy/lint-workflow-bash.shnow and record the result in the PR body. Prove the workflow with a throwaway PR into a branch that already carries.source-size/before relying on it.Low,
observability/src/main/AndroidManifest.xml:5, and the "Nothing else differs, checked file by file" claim in the PR body. Invariant: behaviour changes are stated. Commit4556ca5addsio.sentry.auto-init=falseto the library manifest, and the commit list does not mention it as a change from the source. The README does document it. Scenario: a host that gets Sentry only through manifest auto-init stops reporting without any code change.SentryCrashSink.enabledoes callSentryAndroid.initexplicitly, so a host that goes through the sink is unaffected. Fix: list the manifest addition in the PR body as a deliberate change.Low,
.forgejo/scripts/install-android-sdk.sh:50-77. Invariant: CI setup steps are idempotent on a persistent self-hosted runner.unzip -qinto$SDK, followed bymvintolatest,36.0.0and the platform directory, is not safe to re-run when those paths already exist.unzipasks about overwriting and fails with no stdin, andmvcan nest the directory inside itself. The archive cache under~/.cachesuggests$HOMEpersists. It is copied from fjord-android, so it may already work there with fresh containers. Fix: remove$SDKbefore unpacking, or useunzip -oqandrm -rfthe target before eachmv.Low,
observability/build.gradle.kts:40. Invariant: public API types are visible to consumers.okhttpis animplementationdependency, butHttpsOnlyGuardis a publicokhttp3.Interceptor, andFailureClassifierusesokhttp3.internal.http2.StreamResetException, which is internal API. Scenario: a host on a different OkHttp version or a Gradle strict-API setup breaks, and an OkHttp bump can break the classifier without warning. Fix: expose okhttp asapi, or document that the host must match the pinned version.BLOCKING: 0
Reviewed head
1e8049b27fat 2026-11-19T19:24:11Z by claude -p, read-only tools (Codex unavailable).