fix(fresh): give managed form redirects an explicit navigation strategy - #1600
Conversation
|
[PHASE: IMPL] Implemented and pushed the typed managed-form navigation strategy in Outcome
Red evidenceControlled browser mutation: Gate outputHandoffHarness run: The PR remains draft with |
|
[PHASE: IMPL] — review finding follow-up Closed the browser-test discovery gap with Option 1 in The required Verbatim output from that exact task: Workflow YAML parsing also passed:
The PR remains draft at |
|
[PHASE: IMPL] slice review — finding closed Resynced onto current The finding was that You took the preferred option rather than the disclosure escape hatch: the required CI The implementation itself I reviewed and accept: Added a
|
|
@openhands-agent model=openrouter/deepseek/deepseek-v4-flash-0731 output=pr-comment iterations=800 phase=impl head=717cef36d8e2eaea27234e61ab3ac809680cbfc0 Trusted base SHA: 6619603 use harness SKILL
Act as the formal IMPL-EVAL session for this pull request. Do not edit files, create commits, push, Return concise, severity-ranked findings with exact evidence and required action. End with exactly |
OpenHands Agent — Did not runOPENHANDS_VERDICT: NONE Model: OpenHands Agent SummaryThe agent step did not run (outcome: cancelled). This is a workflow failure, not a task verdict. Diagnostics
See the uploaded Actions artifact for bootstrap.log and agent.log when present. Run: https://github.com/rickylabs/netscript/actions/runs/31623281943 |
|
[PHASE: FALLBACK IMPL-EVAL] [VERDICT: PASS] The cloud evaluator run produced no verdict beyond 20 minutes and was cancelled by the owner. Per that authorization this is one fresh native Opus 5 fallback — read-only, in a clean detached worktree at the immutable evaluated head At head Verified
FindingsC1 — C2 — a published type widened. Advisory. C3 — the strategy silently overrides caller-supplied raw props. Advisory. C4 — two red checks are not caused by this change. Orchestrator-owned. Acceptance check (#1569)All six criteria satisfied with evidence: the typed strategy is declared and exported ( Next
|
Summary
Adds an explicit managed-form navigation policy so redirecting forms can request a full document transition without leaking Fresh's raw
f-client-navtransport attribute. The default remains inherited/client navigation, preserving managed validation-state revival.Scope
packages/freshSlices
a7d470509fd20378b1717cef36dMechanism evidence
false:<form ></form>; a spread string rendersf-client-nav="false".f-client-navand stringifiesBoolean(value), so both boolean and string false render as the literal"false"(@fresh/core@2.3.3/src/runtime/server/preact_hooks.ts:185-197).getAttribute("f-client-nav") === "false"(@fresh/core@2.3.3/src/runtime/client/partials.ts:41-45).{ navigation: 'document' }directly to the literal string, making the outcome renderer-independent.Public shape
FormNavigationMode = 'client' | 'document'FormNavigationStrategy = { readonly navigation: FormNavigationMode }FormProps.strategy?andFormEnhancementOptions.strategy?FormCollectionStrategyshares the navigation vocabulary; legacyclientNav?remains as a deprecated compatibility input.EnhancedFormProps['f-client-nav']widens additively frombooleantoboolean | 'false'.The resolver stays in the existing
components/enhancement.tsxstrategy seam. No builder, route, defer, AI, or internal package paths changed.Red evidence
Focused pre-implementation product red:
Controlled browser mutation (document temporarily resolved to client navigation):
The resolver was restored immediately and the same browser test passed.
Validation
deno run --allow-read --allow-run .llm/tools/run-deno-check.ts --root packages/fresh --ext ts,tsx— exit 0{"selection":{"filesSelected":192,"batches":2,"failedBatches":0},"summary":{"totalOccurrences":0,"uniqueOccurrences":0,"uniqueCodes":0,"uniquePaths":0},"groups":[]}deno run --allow-read --allow-run .llm/tools/run-deno-lint.ts --root packages/fresh --ext ts,tsx— exit 0{"selection":{"filesSelected":192,"batches":1},"summary":{"totalOccurrences":0,"uniqueOccurrences":0,"uniqueCodes":0,"uniquePaths":0},"groups":[]}deno run --allow-read --allow-run .llm/tools/run-deno-fmt.ts --root packages/fresh --ext ts,tsx— exit 0{"command":"deno fmt --check","mode":"check","summary":{"filesSelected":192,"batches":1,"failedBatches":0,"findings":0,"ignoredFindings":0},"findings":[]}deno task --cwd packages/fresh test --reporter=dot— exit 0deno task --cwd packages/fresh test:browser— exit 0.github/workflows/ci.ymlcheck-testjob installs@playwright/cli@0.1.17in runner temp, provisions that package's matching Chromium revision, and invokes the exacttest:browsertask above. The browser regression is no longer manual-only coverage. GitHub execution is deferred only because this lane must keep the PR draft.workflow YAML parse: ok.actionlintis not installed in this environment.deno task quality:gate— exit 0. It reports known doctrine warnings in untouched repository paths.deno task quality:scan --root packages/fresh/src --pretty— exit 0; this explicit target is the package verdict:{"ok":true,"mode":"repository","scanned":["packages/fresh/src"],"findings":[],"allowCount":1}deno task --cwd packages/fresh publish:dry-run— exit 0deno task doc:lint --root packages/fresh --pretty— wrapper exit 0; the form entrypoint has 0 findings. The package baseline remains 44 pre-existing findings in route/query/streams, outside this slice.deno.lock— unchanged; no Deno workspace dependency was added.e2e:cli— intentionally not run per slice boundary.Exact tests:
Form document navigation strategy renders the literal Fresh opt-outForm default navigation strategy preserves inherited client navigationresolveFormNavigationProps maps typed client and document strategiesapplyCollectionStrategy accepts the shared document navigation policybrowser: document form redirect beats inherited body client nav without runtime errorsHarness
.llm/runs/fix-1569-form-redirect-nav-strategy--codex/implstatus:impl.Drift / Debt
drift.md.Definition of Done
check-testlane.main— merge tof2a78abf0, then717cef36d.717cef36dreturned PASS with no blocking finding, after the cloud run was cancelled for producing no verdict beyond 20 minutes. It independently proved RED by revertingform.tsx(SSRstrategy="[object Object]"and browserdocumentAttr === 'false'both failing) and verified the Fresh 2.3.3 reviver contract atpartials.ts:41-44/:258. Advisories C1/C3 filed as fix(fresh): managed form silently drops navigation:'document' when mode:'client' #1609; C2 recorded for the 0.0.6 release notes.