Conversation
There was a problem hiding this comment.
🧹 Nitpick comments (3)
src/components/SidebarDeploymentModel/index.tsx (2)
77-90: Scope document listeners to open state.The click/focus-outside listeners are registered even when the menu is closed. Gate the effect by
openso listeners only exist while the dropdown is visible.♻️ Proposed refinement
- useEffect(() => { - if (!sidebar?.name || !QUICKSTARTS_SIDEBAR_NAMES.has(sidebar.name)) return + useEffect(() => { + if ( + !open || + !sidebar?.name || + !QUICKSTARTS_SIDEBAR_NAMES.has(sidebar.name) + ) { + return + } const handleClickOutside = (e: MouseEvent | TouchEvent | FocusEvent) => { if (!ref.current?.contains(e.target as Node)) setOpen(false) } document.addEventListener("mousedown", handleClickOutside) document.addEventListener("touchstart", handleClickOutside) document.addEventListener("focusin", handleClickOutside) return () => { document.removeEventListener("mousedown", handleClickOutside) document.removeEventListener("touchstart", handleClickOutside) document.removeEventListener("focusin", handleClickOutside) } - }, [sidebar?.name]) + }, [open, sidebar?.name])🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/SidebarDeploymentModel/index.tsx` around lines 77 - 90, The effect attaching document listeners in useEffect runs regardless of the dropdown state; restrict it to only when the dropdown is open to avoid unnecessary listeners and potential leaks. Update the useEffect condition to include the open boolean (e.g. useEffect(..., [sidebar?.name, open])) and early-return when !open or when sidebar?.name is not in QUICKSTARTS_SIDEBAR_NAMES; keep handleClickOutside using ref.current?.contains(...) and setOpen(false), and ensure you still clean up the same event listeners in the returned teardown.
108-113: Avoid custom Enter/Space toggle on a native button.A native
<button>already supports keyboard activation. The custom handler can be redundant and may cause inconsistent toggling behavior. Prefer relying ononClick.♿ Suggested simplification
- onKeyDown={(e) => { - if (e.key === "Enter" || e.key === " ") { - e.preventDefault() - setOpen((v) => !v) - } - }}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/SidebarDeploymentModel/index.tsx` around lines 108 - 113, The custom onKeyDown handler on the button in SidebarDeploymentModel toggling setOpen for Enter/Space is redundant and can conflict with native button behavior; remove the onKeyDown={(e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); setOpen(v => !v) } }} handler and rely on the existing onClick handler to toggle setOpen, and while editing confirm the element is an actual <button> (or add type="button") so keyboard activation and form behavior remain correct.docusaurus.config.ts (1)
125-125: Use a relative path for the footer logo to maintain compatibility with baseUrl changes.Line 125 hardcodes
/docs/in the asset path. Docusaurus v3 automatically prependsbaseUrlto relative static paths in theme config, so usingimg/logos/logo-ory-white-2022-11-04.svgmakes this configuration resilient ifbaseUrlchanges. This matches the pattern already used for the favicon in the same config.Proposed diff
- src: "/docs/img/logos/logo-ory-white-2022-11-04.svg", + src: "img/logos/logo-ory-white-2022-11-04.svg",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docusaurus.config.ts` at line 125, The footer logo src currently uses an absolute path "/docs/img/logos/logo-ory-white-2022-11-04.svg" which breaks when baseUrl changes; update the footer logo configuration in docusaurus.config.ts (the footer logo src property) to use a relative static path "img/logos/logo-ory-white-2022-11-04.svg" so Docusaurus v3 will prepend baseUrl correctly, matching how the favicon is configured.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docusaurus.config.ts`:
- Line 125: The footer logo src currently uses an absolute path
"/docs/img/logos/logo-ory-white-2022-11-04.svg" which breaks when baseUrl
changes; update the footer logo configuration in docusaurus.config.ts (the
footer logo src property) to use a relative static path
"img/logos/logo-ory-white-2022-11-04.svg" so Docusaurus v3 will prepend baseUrl
correctly, matching how the favicon is configured.
In `@src/components/SidebarDeploymentModel/index.tsx`:
- Around line 77-90: The effect attaching document listeners in useEffect runs
regardless of the dropdown state; restrict it to only when the dropdown is open
to avoid unnecessary listeners and potential leaks. Update the useEffect
condition to include the open boolean (e.g. useEffect(..., [sidebar?.name,
open])) and early-return when !open or when sidebar?.name is not in
QUICKSTARTS_SIDEBAR_NAMES; keep handleClickOutside using
ref.current?.contains(...) and setOpen(false), and ensure you still clean up the
same event listeners in the returned teardown.
- Around line 108-113: The custom onKeyDown handler on the button in
SidebarDeploymentModel toggling setOpen for Enter/Space is redundant and can
conflict with native button behavior; remove the onKeyDown={(e) => { if (e.key
=== "Enter" || e.key === " ") { e.preventDefault(); setOpen(v => !v) } }}
handler and rely on the existing onClick handler to toggle setOpen, and while
editing confirm the element is an actual <button> (or add type="button") so
keyboard activation and form behavior remain correct.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: e3ff03ac-b2b0-4340-9191-4c7bb6786bdc
⛔ Files ignored due to path filters (4)
docs/network/kratos/quickstarts/intro.mdxis excluded by!**/*.mdxdocs/oss/getting-started/index.mdxis excluded by!**/*.mdxdocs/oss/projects.mdxis excluded by!**/*.mdxsrc/components/Shared/kratos/index.mdxis excluded by!**/*.mdx
📒 Files selected for processing (5)
docusaurus.config.tssidebars-network.tssrc/components/QuickStarts/constants.tssrc/components/SidebarDeploymentModel/index.tsxsrc/pages/_assets/examples-content.tsx
✅ Files skipped from review due to trivial changes (2)
- sidebars-network.ts
- src/components/QuickStarts/constants.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/pages/_assets/examples-content.tsx
vinckr
left a comment
There was a problem hiding this comment.
The biggest issue I have with this update is that all the concept and guides docs (that apply universally across deployment options) are missing from the OSS and OEL deployment sections.
For example I should be able to find the concepts when I select OSS or OEL as deployment option because these docs are central to understanding anything about how Ory Kratos works.
Right now you can only find them if you select Ory Network as deployment option.
When I come to the quickstart - which many of our users do through GitHub - it seems like there are hardly any docs for Ory Kratos, just some for edgecases like Advanced Cookie Settinsg. Same for OEL.
All the guides and concept docs need to be in a central, easily accessible place otherwise you are completely lost.
Like I would have no idea how a login flow works with Ory Kratos when I self-host without digging into the Ory Network deployment option.
This is for me the biggest blocker to getting this merged.
There are other minor things, that we can also polish later on, but IMHO we need to have a better solution here first.
| items: [ | ||
| { type: "ref", id: "oel/kratos/intro" }, | ||
| { type: "ref", id: "kratos/install" }, | ||
| "self-hosted/oel/kratos/upgrade", |
There was a problem hiding this comment.
this page (https://docs-rfbjzxqwi-ory.vercel.app/docs/self-hosted/oel/kratos/upgrade) should be in the OEL section not OSS?
| { type: "ref", id: "oel/kratos/intro" }, | ||
| { type: "ref", id: "kratos/install" }, | ||
| "self-hosted/oel/kratos/upgrade", | ||
| "self-hosted/oel/kratos/changelog", |
There was a problem hiding this comment.
this doesn't really make sense in OSS section since it's not about the OSS releases.
There was a problem hiding this comment.
Can you specify what 'this' refers to? Is it all 4 lines 55 to 58?
There was a problem hiding this comment.
the line that I commented on "Comment on line R58"
the changelog that is in the OSS section pertains to OEL releases not OSS releases.
the reader might be confused because they would look for a version in OSS that does not exist there.
| "keto/guides/migrating-legacy-policies", | ||
| "keto/guides/upgrade", | ||
| "oel/keto/quickstart", | ||
| "self-hosted/oel/keto/changelog", |
There was a problem hiding this comment.
this doesn't really make sense in OSS section since it's not about the OSS releases.
There was a problem hiding this comment.
Can you specify what 'this' refers to? Is it all 4 lines 208 to 211?
| "oel/oathkeeper/index", | ||
| "oathkeeper/install", | ||
| "self-hosted/oel/oathkeeper/upgrade-oathkeeper", | ||
| "self-hosted/oel/oathkeeper/changelog", |
There was a problem hiding this comment.
this doesn't really make sense in OSS section since it's not about the OSS releases.
There was a problem hiding this comment.
Can you specify what 'this' refers to? Is it all 4 lines 427 to 430?
@vincent, the agreed upon strategy was to build out a frame work so that each deployment could have exactly only the articles relevant to it. What this release does is provide that framework. Due to SEO risk, we were not able to do everything in one release. This has the minimum changes. Future releases will build out the OEL and OSS sections. |
All of these file with 404s had a redirect which is why they weren't working. The redirects are now removed. You might not to clear browser cache to see them working or open via Cognito mode |
… in operations guide
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/welcomePage/SolutionDesignStepper.tsx`:
- Around line 163-170: The answer buttons are visually stateful but lack an ARIA
state; update the button element rendered inside SolutionDesignStepper so it
exposes its selection for assistive tech by adding an aria-pressed attribute
whose value is the same boolean used to compute selected (the same variable used
in the className), keeping the onClick that calls
handleAnswer(currentQuestion.id, option.value) unchanged; ensure the attribute
is present on the <button> that maps option.value so screen readers announce
pressed/unpressed.
- Around line 33-38: The persisted stepper state loaded by useEffect via
loadSolutionDesignProgressFromSessionStorage may contain a stale or out-of-range
currentStep which causes STEPS[currentStep].id to throw; before calling
setCurrentStep and setAnswers, validate that progress.currentStep is a safe
integer within 0 and STEPS.length - 1 (or clamp to that range) and only apply
progress.answers if it matches expected shape/length for STEPS; otherwise ignore
the persisted stepper state (or reset to default step 0) to avoid runtime errors
in SolutionDesignStepper.tsx.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 2c4f3031-8029-4174-a7a6-f08a0690216b
⛔ Files ignored due to path filters (1)
docs/guides/operations.mdxis excluded by!**/*.mdx
📒 Files selected for processing (1)
src/components/welcomePage/SolutionDesignStepper.tsx
| useEffect(() => { | ||
| const progress = loadSolutionDesignProgressFromSessionStorage() | ||
| if (progress) { | ||
| setAnswers(progress.answers) | ||
| setCurrentStep(progress.currentStep) | ||
| } |
There was a problem hiding this comment.
Validate persisted stepper state before applying it.
Session data can be stale/corrupted. If currentStep is out of range, the flow can get stuck and Back can throw at Line 96 (STEPS[currentStep].id).
Proposed fix
useEffect(() => {
const progress = loadSolutionDesignProgressFromSessionStorage()
if (progress) {
- setAnswers(progress.answers)
- setCurrentStep(progress.currentStep)
+ const clampedStep = Math.min(
+ Math.max(progress.currentStep ?? 0, 0),
+ STEPS.length,
+ )
+ const validStepIds = new Set(STEPS.map((s) => s.id))
+ const sanitizedAnswers = Object.fromEntries(
+ Object.entries(progress.answers ?? {}).filter(
+ ([id, value]) =>
+ validStepIds.has(id) && (value === "yes" || value === "no"),
+ ),
+ ) as Record<string, "yes" | "no">
+
+ setAnswers(sanitizedAnswers)
+ setCurrentStep(clampedStep)
}
}, [])🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/components/welcomePage/SolutionDesignStepper.tsx` around lines 33 - 38,
The persisted stepper state loaded by useEffect via
loadSolutionDesignProgressFromSessionStorage may contain a stale or out-of-range
currentStep which causes STEPS[currentStep].id to throw; before calling
setCurrentStep and setAnswers, validate that progress.currentStep is a safe
integer within 0 and STEPS.length - 1 (or clamp to that range) and only apply
progress.answers if it matches expected shape/length for STEPS; otherwise ignore
the persisted stepper state (or reset to default step 0) to avoid runtime errors
in SolutionDesignStepper.tsx.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@sidebars-oss.ts`:
- Around line 19-25: The sidebar category defines a link to the landing doc via
link: { type: "doc", id: "oss/getting-started/index" } and also repeats the same
doc inside the items array, causing duplicate navigation entries; remove the
duplicate string "oss/getting-started/index" from the items array (keep the link
object as the category landing) so the category no longer lists the same doc
twice.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 57373849-1876-4049-a55c-1ccd218ef6a6
⛔ Files ignored due to path filters (80)
docs/kratos/passwordless/06_passkeys-mobile.mdxis excluded by!**/*.mdxdocs/network/getting-started/auth-overview.mdxis excluded by!**/*.mdxdocs/network/hydra/index.mdxis excluded by!**/*.mdxdocs/network/hydra/ory-network-oauth2.mdxis excluded by!**/*.mdxdocs/network/hydra/quickstarts/index.mdxis excluded by!**/*.mdxdocs/network/hydra/quickstarts/ory-network-oauth2.mdxis excluded by!**/*.mdxdocs/network/keto/index.mdxis excluded by!**/*.mdxdocs/network/keto/olymp-file-sharing.mdxis excluded by!**/*.mdxdocs/network/keto/overview.mdxis excluded by!**/*.mdxdocs/network/keto/quickstart.mdxis excluded by!**/*.mdxdocs/network/keto/quickstarts/index.mdxis excluded by!**/*.mdxdocs/network/keto/quickstarts/olymp-file-sharing.mdxis excluded by!**/*.mdxdocs/network/keto/quickstarts/overview.mdxis excluded by!**/*.mdxdocs/network/keto/quickstarts/quickstart.mdxis excluded by!**/*.mdxdocs/network/kratos/01_overview.mdxis excluded by!**/*.mdxdocs/network/kratos/intro.mdxis excluded by!**/*.mdxdocs/network/kratos/quickstarts/01_overview.mdxis excluded by!**/*.mdxdocs/network/kratos/quickstarts/intro.mdxis excluded by!**/*.mdxdocs/network/oathkeeper/index.mdxis excluded by!**/*.mdxdocs/network/oathkeeper/quickstarts/index.mdxis excluded by!**/*.mdxdocs/network/polis/index.mdxis excluded by!**/*.mdxdocs/network/polis/quickstart.mdxis excluded by!**/*.mdxdocs/network/polis/quickstarts/index.mdxis excluded by!**/*.mdxdocs/network/polis/quickstarts/quickstart.mdxis excluded by!**/*.mdxdocs/oel/getting-started/auth-overview.mdxis excluded by!**/*.mdxdocs/oel/hydra/01_tracing.mdxis excluded by!**/*.mdxdocs/oel/hydra/10_scalability.mdxis excluded by!**/*.mdxdocs/oel/hydra/index.mdxis excluded by!**/*.mdxdocs/oel/hydra/quickstart.mdxis excluded by!**/*.mdxdocs/oel/hydra/quickstarts/index.mdxis excluded by!**/*.mdxdocs/oel/hydra/quickstarts/quickstart.mdxis excluded by!**/*.mdxdocs/oel/keto/index.mdxis excluded by!**/*.mdxdocs/oel/keto/overview.mdxis excluded by!**/*.mdxdocs/oel/keto/quickstart.mdxis excluded by!**/*.mdxdocs/oel/keto/quickstarts/index.mdxis excluded by!**/*.mdxdocs/oel/keto/quickstarts/overview.mdxis excluded by!**/*.mdxdocs/oel/keto/quickstarts/quickstart.mdxis excluded by!**/*.mdxdocs/oel/kratos/01_overview.mdxis excluded by!**/*.mdxdocs/oel/kratos/10_scalability.mdxis excluded by!**/*.mdxdocs/oel/kratos/intro.mdxis excluded by!**/*.mdxdocs/oel/kratos/quickstart.mdxis excluded by!**/*.mdxdocs/oel/kratos/quickstarts/01_overview.mdxis excluded by!**/*.mdxdocs/oel/kratos/quickstarts/intro.mdxis excluded by!**/*.mdxdocs/oel/kratos/quickstarts/quickstart.mdxis excluded by!**/*.mdxdocs/oel/oathkeeper/configure-deploy.mdxis excluded by!**/*.mdxdocs/oel/oathkeeper/index.mdxis excluded by!**/*.mdxdocs/oel/oathkeeper/quickstarts/configure-deploy.mdxis excluded by!**/*.mdxdocs/oel/oathkeeper/quickstarts/index.mdxis excluded by!**/*.mdxdocs/oel/polis/index.mdxis excluded by!**/*.mdxdocs/oel/polis/quickstart.mdxis excluded by!**/*.mdxdocs/oel/polis/quickstarts/index.mdxis excluded by!**/*.mdxdocs/oel/polis/quickstarts/quickstart.mdxis excluded by!**/*.mdxdocs/oss/getting-started/auth-overview.mdxis excluded by!**/*.mdxdocs/oss/guidelines/e2e-integration-tests.mdxis excluded by!**/*.mdxdocs/oss/hydra/01_tracing.mdxis excluded by!**/*.mdxdocs/oss/hydra/index.mdxis excluded by!**/*.mdxdocs/oss/hydra/quickstart.mdxis excluded by!**/*.mdxdocs/oss/hydra/quickstarts/index.mdxis excluded by!**/*.mdxdocs/oss/hydra/quickstarts/quickstart.mdxis excluded by!**/*.mdxdocs/oss/keto/index.mdxis excluded by!**/*.mdxdocs/oss/keto/overview.mdxis excluded by!**/*.mdxdocs/oss/keto/quickstart.mdxis excluded by!**/*.mdxdocs/oss/keto/quickstarts/index.mdxis excluded by!**/*.mdxdocs/oss/keto/quickstarts/olymp-file-sharing.mdxis excluded by!**/*.mdxdocs/oss/keto/quickstarts/quickstart.mdxis excluded by!**/*.mdxdocs/oss/kratos/01_overview.mdxis excluded by!**/*.mdxdocs/oss/kratos/10_scalability.mdxis excluded by!**/*.mdxdocs/oss/kratos/intro.mdxis excluded by!**/*.mdxdocs/oss/kratos/quickstart.mdxis excluded by!**/*.mdxdocs/oss/kratos/quickstarts/01_overview.mdxis excluded by!**/*.mdxdocs/oss/kratos/quickstarts/intro.mdxis excluded by!**/*.mdxdocs/oss/kratos/quickstarts/quickstart.mdxis excluded by!**/*.mdxdocs/oss/oathkeeper/configure-deploy.mdxis excluded by!**/*.mdxdocs/oss/oathkeeper/index.mdxis excluded by!**/*.mdxdocs/oss/oathkeeper/quickstarts/configure-deploy.mdxis excluded by!**/*.mdxdocs/oss/oathkeeper/quickstarts/index.mdxis excluded by!**/*.mdxdocs/oss/polis/index.mdxis excluded by!**/*.mdxdocs/oss/polis/quickstart.mdxis excluded by!**/*.mdxdocs/oss/polis/quickstarts/index.mdxis excluded by!**/*.mdxdocs/oss/polis/quickstarts/quickstart.mdxis excluded by!**/*.mdx
📒 Files selected for processing (1)
sidebars-oss.ts
vinckr
left a comment
There was a problem hiding this comment.
in addition to my feedback above I now looked at all the other files, commented on a bunch of smaller stuff and a couple orphaned/empty pages that probably should be moved to shared or deleted. also one page (database) seems to have been deleted entirely.
otherwise lgtm
| :::info | ||
|
|
||
| Interested in the Ory Enterprise License? | ||
| [Contact us to discuss your requirements.](https://www.ory.sh/contact) |
There was a problem hiding this comment.
| [Contact us to discuss your requirements.](https://www.ory.sh/contact) | |
| [Contact us to discuss your requirements.](https://www.ory.com/contact) |
| sidebar_label: Scalability | ||
| --- | ||
|
|
||
| import MyPartial from "@site/src/components/Shared/kratos/10_scalability.mdx" |
There was a problem hiding this comment.
here you can remove the courier content, the rest still somewhat applies (but I would argue it doesn't provide much value to the reader in its current form, so I would recommend removing it altogether for now from the Hydra section)
| @@ -0,0 +1,9 @@ | |||
| <!-- docs/oss/getting-started/auth-overview.mdx --> | |||
There was a problem hiding this comment.
https://docs-dut13asvi-ory.vercel.app/docs/oss/getting-started/auth-overview
is this an orphaned doc? seems to be missing content
| @@ -0,0 +1,4 @@ | |||
| --- | |||
| title: Ory Open Source | |||
| hide_title: true | |||
There was a problem hiding this comment.
will empty pages like this one be indexed / impact SEO?
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
src/components/welcomePage/SolutionDesignStepper.tsx (1)
160-170:⚠️ Potential issue | 🟡 MinorAdd
aria-pressedto expose selection state to assistive technology.The answer buttons are visually stateful but screen readers cannot announce whether an option is selected. This accessibility gap was flagged in a previous review and remains unaddressed.
🔧 Proposed fix
<button key={option.value} type="button" + aria-pressed={selected} onClick={() => handleAnswer(currentQuestion.id, option.value) } className={`w-full flex items-center text-left bg-ory-bg-primary border rounded-ory-btn py-ory-2 px-ory-4 ory-body-sm cursor-pointer text-ory-text-primary ${selected ? "border-ory-border-brand-tertiary" : "border-ory-border-primary"}`} >🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/welcomePage/SolutionDesignStepper.tsx` around lines 160 - 170, The answer buttons in SolutionDesignStepper are visually stateful but lack ARIA state; update the button rendered for each option (the element using option.value, option.label, currentQuestion.id and handleAnswer) to include aria-pressed reflecting the boolean selected state (e.g., aria-pressed={selected}) so screen readers can announce selection; keep the existing onClick/handleAnswer behavior and ensure the value passed remains option.value while aria-pressed uses the selected flag.
🧹 Nitpick comments (7)
src/components/solutionDesignDiagram/consts/canonicalNodes.ts (1)
217-220:JSON.parse(JSON.stringify())is acceptable here but has limitations.This deep-clone approach works since node data contains only serializable primitives. If node data later includes functions,
Dateobjects, orundefinedvalues, they would be lost or converted. Consider a comment noting this constraint.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/solutionDesignDiagram/consts/canonicalNodes.ts` around lines 217 - 220, The cloneNode function uses JSON.parse(JSON.stringify(rest)) which works for current serializable node data but will drop functions, Date objects, undefined, Map/Set, prototypes, and fail on circular references; update the code by adding a concise comment above cloneNode noting these limitations and recommending switching to structuredClone or a proper deep-clone utility if node values later include non-JSON types (references: function cloneNode(def...), the id/rest destructuring and the JSON parse/stringify call).src/components/solutionDesignDiagram/consts/graph.ts (1)
470-496: Consider extracting the repeated "allowed products" check pattern.The same validation pattern (check if selection contains only allowed products) appears in both
applyKratosKetoOnlyEdgeHandles(lines 480-486) andapplyKratosKetoOnlyNodePositionAdjustments(lines 506-511). This could be extracted into a helper function for maintainability.♻️ Optional: Extract shared predicate
+function isKratosKetoOnlySelection(selected: Set<ProductKey>): boolean { + const allowed = new Set<ProductKey>(["kratos", "keto", "elements"]) + for (const k of selected) { + if (!allowed.has(k)) return false + } + return selected.has("kratos") && selected.has("keto") +} + export function applyKratosKetoOnlyEdgeHandles( edges: Edge[], selected: Set<ProductKey>, compactRowLayout: boolean, ): Edge[] { if (compactRowLayout) return edges if (selected.has("oathkeeper")) return edges - - const allowed = new Set<ProductKey>(["kratos", "keto", "elements"]) - let containsDisallowed = false - selected.forEach((k) => { - if (!allowed.has(k)) containsDisallowed = true - }) - if (containsDisallowed) return edges - if (!(selected.has("kratos") && selected.has("keto"))) return edges + if (!isKratosKetoOnlySelection(selected)) return edges🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/solutionDesignDiagram/consts/graph.ts` around lines 470 - 496, Both applyKratosKetoOnlyEdgeHandles and applyKratosKetoOnlyNodePositionAdjustments duplicate the "selected contains only allowed products" logic; extract a small helper (e.g., hasOnlyAllowedProducts or isSubsetOfAllowed) that takes the selected Set<ProductKey> and an iterable/array of allowed keys (the same values used in the current allowed Set) and returns a boolean, then replace the inline loop/containsDisallowed checks in both functions with a call to that helper to improve maintainability and avoid duplication while preserving existing early-return behavior (keep the existing checks for compactRowLayout and selected.has("oathkeeper") in each function).sidebars-oss.ts (1)
3-8: Remove unused import and type alias.
SidebarItemis imported but never used.SidebarItemsConfigis defined but not used in this file.🧹 Suggested cleanup
-import { - SidebarItem, - SidebarItemConfig, -} from "@docusaurus/plugin-content-docs/src/sidebars/types" - -type SidebarItemsConfig = SidebarItemConfig[] +import { SidebarItemConfig } from "@docusaurus/plugin-content-docs/src/sidebars/types"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sidebars-oss.ts` around lines 3 - 8, The file imports SidebarItem and defines SidebarItemsConfig but neither is used; remove the unused import symbol SidebarItem from the import list and delete the unused type alias SidebarItemsConfig, keeping only the needed import SidebarItemConfig to clean up the file and avoid unused-symbol warnings.sidebars.ts (1)
8-9: Remove leftover comment and dead code.Line 8 duplicates the file comment from line 1, and line 9 contains a commented-out import that's already present on line 2.
🧹 Suggested cleanup
type SidebarItemsConfig = SidebarItemConfig[] -// sidebars.ts -//import type { SidebarsConfig } from "@docusaurus/plugin-content-docs" - // adjust imports depending on how those files export🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sidebars.ts` around lines 8 - 9, Remove the duplicated file header comment and the commented-out import in sidebars.ts: delete the redundant line that repeats the "// sidebars.ts" header and remove the commented import "//import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"" since the import is already present elsewhere, leaving only the necessary single header and the actual import.sidebars-quickstarts.ts (2)
199-200: Fragile array index access.Using
overviewAndNetwork[0]andoverviewAndNetwork[1]couples this code to the exact order and structure ofoverviewAndNetwork. If items are added or reordered, this will silently break.Consider extracting the shared "Quickstarts" doc reference and "Ory Network" category as named constants for safer composition.
🧹 Suggested approach
+const quickstartsDoc = { + type: "doc", + id: "getting-started/overview", + label: "Quickstarts", +} + +const networkCategory = { + type: "category", + label: "Ory Network", + // ... rest of config +} + const overviewAndNetwork = [ - { - type: "doc", - id: "getting-started/overview", - label: "Quickstarts", - }, - { - type: "category", - label: "Ory Network", - // ... - }, + quickstartsDoc, + networkCategory, // OEL and OSS categories... ] -const overviewAndNetworkOnly = [overviewAndNetwork[0], overviewAndNetwork[1]] +const overviewAndNetworkOnly = [quickstartsDoc, networkCategory]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sidebars-quickstarts.ts` around lines 199 - 200, The current construction of overviewAndNetworkOnly uses fragile index access (overviewAndNetwork[0], overviewAndNetwork[1]) which will break if the array order changes; replace this by extracting the specific Quickstarts doc and Ory Network category into named constants (e.g., quickstartsDoc and oryNetworkCategory) or by locating them in overviewAndNetwork via a stable identifier (title, id, or type) and then compose overviewAndNetworkOnly = [quickstartsDoc, oryNetworkCategory]; update any references to overviewAndNetworkOnly and ensure the extractor uses the unique symbols (Quickstarts doc, Ory Network category, overviewAndNetwork, overviewAndNetworkOnly) so future reorderings are safe.
202-348: Consider extracting shared category definitions to reduce duplication.The OEL category structure (lines 208-273) is nearly identical to the one defined within
overviewAndNetwork(lines 65-130), and similarly for OSS (lines 282-347 vs lines 131-196). Extracting these as shared constants would make future maintenance easier and ensure consistency.♻️ Suggested approach
// Define reusable category factories or constants const oelCategory = { type: "category", label: "Ory Enterprise License", collapsed: false, collapsible: false, className: "sidebar-quickstart-top-level", items: [ // Ory Kratos, Keto, Hydra, Polis, Oathkeeper... ], } const ossCategory = { type: "category", label: "Ory Open Source", // ... } // Then compose sidebars using these constants const overviewAndNetwork = [quickstartsDoc, networkCategory, oelCategory, ossCategory] const overviewAndOel = [quickstartsDoc, oelCategory] const overviewAndOss = [quickstartsDoc, ossCategory]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sidebars-quickstarts.ts` around lines 202 - 348, Duplicate sidebar category definitions cause maintenance burden; extract the shared OEL and OSS category objects and reuse them. Create reusable constants (e.g., oelCategory and ossCategory) that contain the category structure used inside overviewAndOel and overviewAndOss, then replace the duplicated inline objects in overviewAndOel and overviewAndOss with references to those constants; ensure the items arrays (Kratos, Keto, Hydra, Polis, Oathkeeper) remain identical and preserve className/collapsible flags so existing behavior for overviewAndNetwork, overviewAndOel, and overviewAndOss stays the same.sidebars-network.ts (1)
2-7: Remove unused imports and type alias.
SidebarItemandSidebarItemConfigare imported but not used for type annotations. TheSidebarItemsConfigtype alias is also unused.🧹 Suggested cleanup
// sidebars-network.ts -import { - SidebarItem, - SidebarItemConfig, -} from "@docusaurus/plugin-content-docs/src/sidebars/types" - -type SidebarItemsConfig = SidebarItemConfig[] const networkSidebar = [🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sidebars-network.ts` around lines 2 - 7, The import and type alias cleanup: remove the unused imports SidebarItem and SidebarItemConfig from the import statement and delete the unused type alias SidebarItemsConfig; update any remaining code to rely on the actual types where needed or no types at all so the file no longer references SidebarItem, SidebarItemConfig, or SidebarItemsConfig.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/OryArchitectureDiagram.tsx`:
- Around line 188-196: The toggleFullscreen handler currently calls
el.requestFullscreen?.().then(...) and document.exitFullscreen?.().then(...),
which will throw if those methods are undefined; update toggleFullscreen (using
containerRef, requestFullscreen, exitFullscreen, and setIsFullscreen) to check
for existence of requestFullscreen/exitFullscreen before calling them and only
call .then on the returned Promise (or handle the synchronous/undefined case by
setting isFullscreen directly or no-op), e.g., guard with if
(el.requestFullscreen) { const p = el.requestFullscreen(); if (p && p.then)
p.then(() => setIsFullscreen(true)); else setIsFullscreen(true); } and similarly
for document.exitFullscreen to avoid calling .then on undefined.
---
Duplicate comments:
In `@src/components/welcomePage/SolutionDesignStepper.tsx`:
- Around line 160-170: The answer buttons in SolutionDesignStepper are visually
stateful but lack ARIA state; update the button rendered for each option (the
element using option.value, option.label, currentQuestion.id and handleAnswer)
to include aria-pressed reflecting the boolean selected state (e.g.,
aria-pressed={selected}) so screen readers can announce selection; keep the
existing onClick/handleAnswer behavior and ensure the value passed remains
option.value while aria-pressed uses the selected flag.
---
Nitpick comments:
In `@sidebars-network.ts`:
- Around line 2-7: The import and type alias cleanup: remove the unused imports
SidebarItem and SidebarItemConfig from the import statement and delete the
unused type alias SidebarItemsConfig; update any remaining code to rely on the
actual types where needed or no types at all so the file no longer references
SidebarItem, SidebarItemConfig, or SidebarItemsConfig.
In `@sidebars-oss.ts`:
- Around line 3-8: The file imports SidebarItem and defines SidebarItemsConfig
but neither is used; remove the unused import symbol SidebarItem from the import
list and delete the unused type alias SidebarItemsConfig, keeping only the
needed import SidebarItemConfig to clean up the file and avoid unused-symbol
warnings.
In `@sidebars-quickstarts.ts`:
- Around line 199-200: The current construction of overviewAndNetworkOnly uses
fragile index access (overviewAndNetwork[0], overviewAndNetwork[1]) which will
break if the array order changes; replace this by extracting the specific
Quickstarts doc and Ory Network category into named constants (e.g.,
quickstartsDoc and oryNetworkCategory) or by locating them in overviewAndNetwork
via a stable identifier (title, id, or type) and then compose
overviewAndNetworkOnly = [quickstartsDoc, oryNetworkCategory]; update any
references to overviewAndNetworkOnly and ensure the extractor uses the unique
symbols (Quickstarts doc, Ory Network category, overviewAndNetwork,
overviewAndNetworkOnly) so future reorderings are safe.
- Around line 202-348: Duplicate sidebar category definitions cause maintenance
burden; extract the shared OEL and OSS category objects and reuse them. Create
reusable constants (e.g., oelCategory and ossCategory) that contain the category
structure used inside overviewAndOel and overviewAndOss, then replace the
duplicated inline objects in overviewAndOel and overviewAndOss with references
to those constants; ensure the items arrays (Kratos, Keto, Hydra, Polis,
Oathkeeper) remain identical and preserve className/collapsible flags so
existing behavior for overviewAndNetwork, overviewAndOel, and overviewAndOss
stays the same.
In `@sidebars.ts`:
- Around line 8-9: Remove the duplicated file header comment and the
commented-out import in sidebars.ts: delete the redundant line that repeats the
"// sidebars.ts" header and remove the commented import "//import type {
SidebarsConfig } from "@docusaurus/plugin-content-docs"" since the import is
already present elsewhere, leaving only the necessary single header and the
actual import.
In `@src/components/solutionDesignDiagram/consts/canonicalNodes.ts`:
- Around line 217-220: The cloneNode function uses
JSON.parse(JSON.stringify(rest)) which works for current serializable node data
but will drop functions, Date objects, undefined, Map/Set, prototypes, and fail
on circular references; update the code by adding a concise comment above
cloneNode noting these limitations and recommending switching to structuredClone
or a proper deep-clone utility if node values later include non-JSON types
(references: function cloneNode(def...), the id/rest destructuring and the JSON
parse/stringify call).
In `@src/components/solutionDesignDiagram/consts/graph.ts`:
- Around line 470-496: Both applyKratosKetoOnlyEdgeHandles and
applyKratosKetoOnlyNodePositionAdjustments duplicate the "selected contains only
allowed products" logic; extract a small helper (e.g., hasOnlyAllowedProducts or
isSubsetOfAllowed) that takes the selected Set<ProductKey> and an iterable/array
of allowed keys (the same values used in the current allowed Set) and returns a
boolean, then replace the inline loop/containsDisallowed checks in both
functions with a call to that helper to improve maintainability and avoid
duplication while preserving existing early-return behavior (keep the existing
checks for compactRowLayout and selected.has("oathkeeper") in each function).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: c0ccbfa2-876f-4640-b7e7-05e656a1faf2
⛔ Files ignored due to path filters (23)
docs/_common/need-selfhosted-support.mdxis excluded by!**/*.mdxdocs/hydra/self-hosted/deploy-hydra-example.mdxis excluded by!**/*.mdxdocs/kratos/guides/deploy-kratos-example.mdxis excluded by!**/*.mdxdocs/kratos/passwordless/00_overview.mdxis excluded by!**/*.mdxdocs/kratos/passwordless/06_passkeys-mobile.mdxis excluded by!**/*.mdxdocs/kratos/social-signin/10_google.mdxis excluded by!**/*.mdxdocs/network/getting-started/index.mdxis excluded by!**/*.mdxdocs/oss/open-source.mdxis excluded by!**/*.mdxdocs/self-hosted/oel/oauth2/changelog.mdxis excluded by!**/*.mdxdocs/self-hosted/oel/quickstart.mdxis excluded by!**/*.mdxsrc/components/Shared/hydra/index.mdxis excluded by!**/*.mdxsrc/components/Shared/hydra/ory-network-oauth2.mdxis excluded by!**/*.mdxsrc/components/Shared/hydra/quickstart.mdxis excluded by!**/*.mdxsrc/components/Shared/keto/index.mdxis excluded by!**/*.mdxsrc/components/Shared/keto/olymp-file-sharing.mdxis excluded by!**/*.mdxsrc/components/Shared/keto/overview.mdxis excluded by!**/*.mdxsrc/components/Shared/keto/quickstart.mdxis excluded by!**/*.mdxsrc/components/Shared/keto/quickstarts/quickstart.mdxis excluded by!**/*.mdxsrc/components/Shared/kratos/01_mfa-overview.mdxis excluded by!**/*.mdxsrc/components/Shared/kratos/index.mdxis excluded by!**/*.mdxsrc/components/Shared/kratos/quickstart.mdxis excluded by!**/*.mdxsrc/components/Shared/oathkeeper/configure-deploy.mdxis excluded by!**/*.mdxsrc/components/Shared/polis/quickstart.mdxis excluded by!**/*.mdx
📒 Files selected for processing (19)
sidebars-agentic.tssidebars-b2b.tssidebars-ciam.tssidebars-network.tssidebars-oss.tssidebars-quickstarts.tssidebars-workforce.tssidebars.tssrc/components/OryArchitectureDiagram.tsxsrc/components/oryArchitectureDiagramModel.tssrc/components/solutionDesignDiagram/consts/canonicalNodes.tssrc/components/solutionDesignDiagram/consts/graph.tssrc/components/solutionDesignDiagram/ui/edges.tsxsrc/components/solutionDesignDiagram/ui/nodes.tsxsrc/components/welcomePage/SolutionDesignStepper.tsxsrc/components/welcomePage/solutionDesignStepper/consts/index.tssrc/components/welcomePage/solutionDesignStepper/utils/products.tssrc/components/welcomePage/solutionDesignStepper/utils/storage.tssrc/navbar.ts
✅ Files skipped from review due to trivial changes (6)
- sidebars-agentic.ts
- sidebars-workforce.ts
- sidebars-ciam.ts
- sidebars-b2b.ts
- src/components/welcomePage/solutionDesignStepper/utils/products.ts
- src/components/welcomePage/solutionDesignStepper/consts/index.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- src/components/welcomePage/solutionDesignStepper/utils/storage.ts
- src/components/oryArchitectureDiagramModel.ts
| const toggleFullscreen = useCallback(() => { | ||
| const el = containerRef.current | ||
| if (!el) return | ||
| if (!document.fullscreenElement) { | ||
| el.requestFullscreen?.().then(() => setIsFullscreen(true)) | ||
| } else { | ||
| document.exitFullscreen?.().then(() => setIsFullscreen(false)) | ||
| } | ||
| }, []) |
There was a problem hiding this comment.
Handle missing fullscreen API gracefully.
The optional chaining el.requestFullscreen?.() returns undefined if the method doesn't exist, and calling .then() on undefined will throw. This can occur in environments without fullscreen support (e.g., some iframes, older browsers).
🔧 Proposed fix
const toggleFullscreen = useCallback(() => {
const el = containerRef.current
if (!el) return
if (!document.fullscreenElement) {
- el.requestFullscreen?.().then(() => setIsFullscreen(true))
+ el.requestFullscreen?.()?.then(() => setIsFullscreen(true))
} else {
- document.exitFullscreen?.().then(() => setIsFullscreen(true))
+ document.exitFullscreen?.()?.then(() => setIsFullscreen(false))
}
}, [])📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const toggleFullscreen = useCallback(() => { | |
| const el = containerRef.current | |
| if (!el) return | |
| if (!document.fullscreenElement) { | |
| el.requestFullscreen?.().then(() => setIsFullscreen(true)) | |
| } else { | |
| document.exitFullscreen?.().then(() => setIsFullscreen(false)) | |
| } | |
| }, []) | |
| const toggleFullscreen = useCallback(() => { | |
| const el = containerRef.current | |
| if (!el) return | |
| if (!document.fullscreenElement) { | |
| el.requestFullscreen?.()?.then(() => setIsFullscreen(true)) | |
| } else { | |
| document.exitFullscreen?.()?.then(() => setIsFullscreen(false)) | |
| } | |
| }, []) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/components/OryArchitectureDiagram.tsx` around lines 188 - 196, The
toggleFullscreen handler currently calls el.requestFullscreen?.().then(...) and
document.exitFullscreen?.().then(...), which will throw if those methods are
undefined; update toggleFullscreen (using containerRef, requestFullscreen,
exitFullscreen, and setIsFullscreen) to check for existence of
requestFullscreen/exitFullscreen before calling them and only call .then on the
returned Promise (or handle the synchronous/undefined case by setting
isFullscreen directly or no-op), e.g., guard with if (el.requestFullscreen) {
const p = el.requestFullscreen(); if (p && p.then) p.then(() =>
setIsFullscreen(true)); else setIsFullscreen(true); } and similarly for
document.exitFullscreen to avoid calling .then on undefined.
Co-authored-by: Vincent <vincent@ory.sh>
Preview link: https://docs-rfbjzxqwi-ory.vercel.app/docs
Summary
This PR delivers a significant redesign of the Ory documentation site, introducing a new Homepage navigation experience, a new Quick Start page, restructured content architecture, and visual design improvements. It also establishes the foundational framework for separating documentation by deployment model: Ory Network, Ory OEL, and Ory OSS.
Changes
Homepage navigation
Replaced the previous homepage with a guided navigation experience that helps technical evaluators and developers orient quickly and find the right entry point for their use case. (Aligns better with our marketing site.)
Quick Start page
Added a new Quick Start page as a dedicated onboarding path for developers getting started with Ory for the first time.
Content restructuring
Reorganized existing documentation to support clearer content hierarchy. This restructuring is a prerequisite for the deployment-model separation work.
Product overview
Added new high-level product explanations with visual elements to demonstrate how each product fits within the context of an IAM system.
Visual design enhancements
Updated layout, typography, and component styling throughout the portal for improved readability and consistency. Introduced product color association.
Deployment model framework
Introduced the structural scaffolding to separate documentation by deployment context — Ory Network, Ory OEL, and Ory OSS — enabling product-specific content targeting in follow-on PRs.
What's not included
Full content separation by deployment model is out of scope for this PR. This change puts the framework in place; content migration and product-specific pages will follow.
Complete alignment on product names is out of the scope of this PR.
TESTING
New feature documentation (last few months)
Verify your new content appears in the redesigned navigation (docs/sidebar.ts). If it doesn't appear, add it to the /docs/sidebar.ts.
NOTE: There are several new sidebar files located within the /docs folder; if your content was added to the previous sidebar.ts file located in /src that file is no longer in use.
Content is complete
Verify that your product area contains the expected full set of content. The restructure may have affected navigation visibility for some pages.
Broken links
Spot-check links in your product area. Internal navigation files were significantly changed in this redesign.
Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.com) from the maintainers to push the changes.
Summary by CodeRabbit
New Features
Documentation
Updates
Infrastructure