Add advanced Context helpers guide#673
Conversation
The manual had no single place where readers could find all the advanced Context methods. parseUri(), routeActivity(), getSignedKey()/getSignedKeyOwner(), getDocumentLoader(), getActorKeyPairs(), lookupObject()/lookupWebFinger()/lookupNodeInfo(), traverseCollection(), and RequestContext.request/url were scattered across the inbox, access-control, webfinger, and nodeinfo pages. This commit adds docs/manual/context-advanced.md, a dedicated guide that gathers every advanced helper in one place with usage examples, a quick-reference table, and links back to the protocol-specific pages for deeper coverage. The existing Context page now carries a pointer to the new guide. Closes fedify-dev#670 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR adds comprehensive documentation for advanced Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a new documentation page, "Advanced context helpers," which provides detailed guidance on URI parsing, manual activity routing, signature introspection, and authenticated fetching. It also updates the project's Markdown formatting configuration and refreshes numerous dependencies in the lockfile. Feedback was provided to improve a code example in the new documentation by using optional chaining to safely handle cases where an actor might not have any registered key pairs.
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
Background
The manual already covers several advanced
ContextandRequestContextmethods, but the material is spread across multiple pages:routeActivity()in the inbox guide,getSignedKeyOwner()in the access control guide, and remote-lookup helpers split across the WebFinger and NodeInfo pages. This makes the higher-levelContextAPI harder to discover than it should be.Changes
Contexthelpers in one place, with usage examples and a quick-reference table:parseUri()routeActivity()(including its security/trust semantics)getSignedKey()andgetSignedKeyOwner()(including the instance actor / mutual authorized fetch pattern)getDocumentLoader()and authenticated document loadinggetActorKeyPairs()lookupObject(),lookupWebFinger(),lookupNodeInfo(), andtraverseCollection()RequestContext.requestandRequestContext.urlProtocol-specific caveats (authorized fetch, WebFinger resolution, NodeInfo discovery, etc.) are kept in their existing pages; the new guide provides concise summaries and links back to those pages for deeper coverage.
Closes #670