You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: extract the console layout from the operations layout - #1642
First of five pull requests splitting #1533 (the API docs page) so it can be reviewed in steps. The API docs reuse the Operations console's shell, so this one only moves that shell out of OperationsLayout into a shared ConsoleLayout. Nothing changes on screen.
Changes
ConsoleLayout draws the shell from its props: the sidebar of grouped pages, the header naming the current one, the mobile nav that scrolls sideways, the theme switch and the way back to /dev/null (a guest finds it on a phone too).
OperationsLayout keeps what only Operations does (polling, refreshing, the remotes dock) and passes its pages in, with Moderation as an item elsewhere and prefetch off, as before.
Two options of ConsoleLayout are only used by the API docs, from #1643 on: links that prefetch (Operations leaves it off) and the way back for a guest on a phone (Operations only has signed-in admins). They are part of the shell, so they come with it, tested.
The stack, each opened as a draft until the one below it merges:
Playwright (Chromium) against a local dev server, emulated viewports. Operations was captured before (production) and after at 1440×900, 1366×650 and 390×844, light and dark, while this change was part of #1533; the pairs differ only in the pulsing live dot. The commit is unchanged since, only rebased.
Before, 1440 light
After, 1440 light
Before, 390 dark
After, 390 dark
Device verification
Emulation only (390×844, DPR 2, touch): no hardware or simulator.
Independent review
Fresh read-only reviewers, given the guidelines, the stack, the validation results and the captures. A first round on the previous heads found should-fix points (fixtures and options ahead of their PR, the Errors table hiding its meanings on a phone, the Guilds preview, captures from before production's guild fields), all fixed. Re-review on base 1aa85cf4, head 6e94300c: CODE: PASS, VISUAL: PASS, no blocker or should-fix. The Operations captures were checked against this exact layout code. Since then, the stack was rebased on production (2721251d) for the Mac app's removal and the new guild endpoints, and the full suite passed again, at 100% line and type coverage, on head eb22e8c8.
Review was skipped as selected files did not have any reviewable changes.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: a56edc87-74d0-4eb6-99cc-e3a875ce1e33
Commits
Reviewing files that changed from the base of the PR and between eb22e8c and bffa6b3.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The change adds a reusable responsive console layout and updates the operations layout to use it. Unit tests cover the console layout’s navigation, branding, page content, prefetch settings, and user-aware links.
Changes: Console layout and operations integration
Layer / File(s)
Summary
Build the shared console shell resources/js/layouts/console/layout.tsx
Adds navigation types and a responsive console layout with grouped navigation, branding, page headings, optional header actions, appearance controls, and user-aware return links.
Adopt the shared shell in operations resources/js/layouts/operations/layout.tsx
Passes operations navigation and page controls to ConsoleLayout. Polling, manual refresh, remote hooks, and the conditional chat dock remain in the operations layout.
dev-null-sh/dev-null.sh#1533 — Adds the same shared ConsoleLayout extraction and its use by the operations layout.
Suggested reviewers:xheaven
Merge Risk: Minimal · previous review 6e943
This refactor moves the shared console shell into a reusable layout and keeps Operations-specific behavior in place. No concrete regression was found, and the new tests cover the shared layout's key behaviors. Merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "refactor: extract the console layout from the operations layout" matches the main change. The PR adds ConsoleLayout in resources/js/layouts/console/layout.tsx and moves the shared shell out…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check
Explanation
The title "refactor: extract the console layout from the operations layout" matches the main change. The PR adds ConsoleLayout in resources/js/layouts/console/layout.tsx and moves the shared shell out of OperationsLayout, which now delegates to it. The title is specific and concise, and it names the primary change without noise or vague terms.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 8186432c-48da-41f8-9f45-b906d637ae57
Commits
Reviewing files that changed from the base of the PR and between 6946cfb and 6e94300.
Files selected for processing: 3
resources/js/layouts/console/layout.tsx
resources/js/layouts/operations/layout.tsx
tests/Unit/ConsoleLayout.test.tsx
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
The API docs page reuses the operations console's shell: the sidebar of
grouped pages, the header naming the current one, the mobile nav that
scrolls sideways, the theme switch and the way back to /dev/null.
ConsoleLayout now draws that shell from its props: the brand chip and
label, the nav landmark's own label, whether its links prefetch, and a
title that falls back to the console's name. OperationsLayout keeps
what only operations does (polling, refreshing, the remotes dock) and
passes its pages in, with Moderation as an item elsewhere and prefetch
off, as before. Nothing changes on screen: captures before and after
differ only in the pulsing live dot.
Two things only the API docs will use come with it, as part of the
shell: links that prefetch, which operations leaves off, and the way
back for a guest on a phone, since operations only has signed-in
admins.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First of five pull requests splitting #1533 (the API docs page) so it can be reviewed in steps. The API docs reuse the Operations console's shell, so this one only moves that shell out of
OperationsLayoutinto a sharedConsoleLayout. Nothing changes on screen.Changes
ConsoleLayoutdraws the shell from its props: the sidebar of grouped pages, the header naming the current one, the mobile nav that scrolls sideways, the theme switch and the way back to /dev/null (a guest finds it on a phone too).OperationsLayoutkeeps what only Operations does (polling, refreshing, the remotes dock) and passes its pages in, with Moderation as an item elsewhere and prefetch off, as before.Two options of
ConsoleLayoutare only used by the API docs, from #1643 on: links that prefetch (Operations leaves it off) and the way back for a guest on a phone (Operations only has signed-in admins). They are part of the shell, so they come with it, tested.The stack, each opened as a draft until the one below it merges:
productionValidation
tests/draft-images.config.ts)ConsoleLayout.test.tsx12tscvp fmt --check,vp lintNo PHP changes.
Visual evidence
Playwright (Chromium) against a local dev server, emulated viewports. Operations was captured before (
production) and after at 1440×900, 1366×650 and 390×844, light and dark, while this change was part of #1533; the pairs differ only in the pulsing live dot. The commit is unchanged since, only rebased.Device verification
Emulation only (390×844, DPR 2, touch): no hardware or simulator.
Independent review
Fresh read-only reviewers, given the guidelines, the stack, the validation results and the captures. A first round on the previous heads found should-fix points (fixtures and options ahead of their PR, the Errors table hiding its meanings on a phone, the Guilds preview, captures from before production's guild fields), all fixed. Re-review on base
1aa85cf4, head6e94300c: CODE: PASS, VISUAL: PASS, no blocker or should-fix. The Operations captures were checked against this exact layout code. Since then, the stack was rebased onproduction(2721251d) for the Mac app's removal and the new guild endpoints, and the full suite passed again, at 100% line and type coverage, on headeb22e8c8.Limitations
None.