Skip to content

V1.1.0/post fix not found - #6

Closed
gimlichael wants to merge 3 commits into
mainfrom
v1.1.0/post-fix-not-found
Closed

gimlichael wants to merge 3 commits into
mainfrom
v1.1.0/post-fix-not-found

Conversation

@gimlichael

Copy link
Copy Markdown
Member

This pull request introduces destination-aware framework view fallback so navigation and direct links to APIs unavailable in the current framework resolve cleanly instead of returning HTTP 404. The generator now emits a deduplicated page availability inventory, merges missing non-default API sections into shared root navigation, and coordinates HTTP 302 server redirects with client-side link resolution.

Availability inventory and navigation:

  • Build a deterministic, deduplicated page availability map from the generated native DocFX HTML output across all framework views.
  • Merge unresolved API sections in the shared root navigation TOC from the first framework view in precedence order where each section exists.
  • Emit ordered NGINX fallback rules alongside the availability manifest during site packaging.

Server and client fallback routing:

  • Redirect unavailable HTML API pages and directory indexes via HTTP 302 to the first available framework in precedence order while preserving unrelated query parameters and returning 404 for genuinely missing or non-HTML API resources.
  • Resolve destination-aware framework links directly on anchors across global navigation, TOCs, breadcrumbs, search results, and internal API hyperlinks so new-tab navigation works without click interception.
  • Unify framework selector fallback order with server-side precedence for both default and non-default API targets.

Regression and acceptance coverage:

  • Expand unit tests for page availability indexing, NGINX fallback rule generation, API path normalization, and shared navigation TOC merging.
  • Add modern-only and standard-only fixture projects and expand container, Playwright browser, and HTTP routing checks for 302 fallback, 404/400 boundaries, query/fragment preservation, and JavaScript-disabled navigation.
  • Extend the Cuemon multi-section acceptance fixture to cover Cuemon.AspNetCore alongside Cuemon.Kernel and Cuemon.IO and verify cross-target fallback behavior.

Documentation:

  • Document the unified precedence contract, availability manifest schema, shared navigation merging, and NGINX/client fallback behavior.
  • Update test suite documentation to reflect the expanded multi-section fixtures, HTTP fallback checks, and Cuemon acceptance expectations.

Generate a deduplicated page availability inventory in framework-views.json, merge missing API sections into shared root navigation, configure NGINX 302 fallback routing for unavailable HTML pages, and update framework-view.js to resolve destination-aware view links across navigation, search, and the framework selector.
Expand unit, container, Playwright, and Cuemon acceptance tests along with fixture APIs to verify page availability manifests, shared navigation merging, HTTP 302 fallback routing, and client-side link and selector resolution.
Update framework-views and test suite documentation to describe the availability manifest, shared root TOC merging, NGINX 302 fallback rules, and expanded browser and Cuemon test coverage.
@gimlichael gimlichael self-assigned this Nov 26, 2026
@gimlichael gimlichael closed this Nov 26, 2026
@gimlichael
gimlichael deleted the v1.1.0/post-fix-not-found branch November 26, 2026 10:26
@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Confidence Score: 4/5 · The PR appears safe to merge, with a non-blocking mismatch between the documented duplicate-view rule and the route checks.RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change affects API navigation and direct API-page requests on framework-view sites.

The PR appears safe to merge, with a non-blocking mismatch between the documented duplicate-view rule and the route checks.

FindingsFix All in CodexFindings

  1. P2 Duplicate views bypass rejection ▶
Fix with agent prompt
### Issue 1
framework-views/framework-views.nginx.conf:75
The new check runs only after a page lookup fails. An existing API page requested with three valid `view` arguments still returns 200, and `/xrefmap.yml` skips this check too. This contradicts the new documentation promising 400 for excess `view` arguments, so callers cannot rely on that rule. Apply the check before both lookups, or narrow the documented promise to fallback requests.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds destination-aware framework fallback across generated navigation, browser links, and HTTP redirects.

  • Shared navigation links include API sections from available frameworks.
  • API links open in the first framework that contains their destination.
  • Unavailable API pages redirect to a framework that contains them.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Native DocFX output for each framework] --> B[Page availability inventory]
    A --> C[Shared navigation merge]
    B --> D[Browser resolves anchor destinations]
    E[API request] --> F{Page exists in requested framework?}
    F -->|Yes| G[Serve page]
    F -->|No| H{HTML page or directory index?}
    H -->|No| I[Return 404]
    H -->|Yes| J[Check frameworks in precedence order]
    J -->|Found| K[Return 302 with resolved view]
    J -->|Missing everywhere| I
Loading

Reviews (1) · Last reviewed commit: "📝 document destination-aware framework ..." · Reviewed by Greptile

}
location @framework_fallback {
if ($framework_fallback_target = "") { return 404; }
if ($framework_args_2 ~* "(?:^|&)view=") { return 400 "Unknown documentation view."; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Duplicate views bypass rejection

The new check runs only after a page lookup fails. An existing API page requested with three valid view arguments still returns 200, and /xrefmap.yml skips this check too. This contradicts the new documentation promising 400 for excess view arguments, so callers cannot rely on that rule. Apply the check before both lookups, or narrow the documented promise to fallback requests.

Prompt To Fix With AI
This is a comment left during a code review.
Path: framework-views/framework-views.nginx.conf
Line: 75

Comment:
**Duplicate views bypass rejection**

The new check runs only after a page lookup fails. An existing API page requested with three valid `view` arguments still returns 200, and `/xrefmap.yml` skips this check too. This contradicts the new documentation promising 400 for excess `view` arguments, so callers cannot rely on that rule. Apply the check before both lookups, or narrow the documented promise to fallback requests.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants