Skip to content

perf(docs): shrink the runtime image with standalone output - #8064

Merged
tylerslaton merged 3 commits into
mainfrom
contextablemark/docs-standalone-packaging
Nov 4, 2026
Merged

tylerslaton merged 3 commits into
mainfrom
contextablemark/docs-standalone-packaging

Conversation

@contextablemark

@contextablemark contextablemark commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

The docs runtime currently copies the complete installed dependency tree and complete .next directory. This packages compiler/test tooling and files the serving process does not need. Use Next's standalone server and traced dependencies while preserving the /app/shell-docs layout required by Turbopack's relative MDX/Shiki aliases.

Enable output: "standalone" with the parent tracing root; copy the standalone tree to /app, explicitly copy .next/static, public, and src/content, and launch node server.js on port 10000 with an explicit hostname. Adapt the existing network-isolated final-image check to launch this same server and also check Markdown, JS, CSS, and a public image.

Only showcase/shell-docs/Dockerfile and showcase/shell-docs/next.config.ts change. No dependency/lockfile, shared workflow, deployment policy, pin, or Railway configuration changes.

Matched local packaging experiment

Both images were built on Mark's Mac for linux/amd64, using the same pinned source 68290394694a981d274294a07de0e8b2e66d04c8, build arguments, and existing Node 22.23.4 base image. The trial adds the two-file packaging patch. The patch was uncommitted during that experiment, so its build label identifies the starting revision, not the complete trial file tree. The control uses the original Dockerfile via stdin and restores the original Next config inside the builder via an inline COPY; it does not overwrite the working tree or preview files.

Sizes below are the sum of compressed gzip layer sizes from exported OCI manifests, excluding configuration, manifest/index metadata, and provenance attestations. Archives were streamed and parsed in memory; neither image was pushed.

Packaging Compressed layer bytes Decimal MB
Original control 554,409,182 554.4
Standalone trial 196,850,682 196.9
Saved 357,558,500 357.6 (64.49%)

These matched local builds are distinct from the previously observed published #8054 image (578,551,545 compressed layer bytes). The 64.49% figure is the matched local A/B result, not a cross-revision comparison with that published image.

Both production builds passed compilation, TypeScript, static-page generation, the Node-version check, and their final-runtime route assertions. The control retained the original three HTML assertions. The trial additionally passed:

  • /generative-ui/components.md: HTTP 200, Markdown MIME type, expected content.
  • A JS chunk and CSS stylesheet referenced by the Button page: HTTP 200 and non-empty bodies.
  • /images/ag-ui-overview-with-partners.png: HTTP 200 and non-empty body.

The build-time runtime check runs with RUN --network=none, uses loopback only, and needs no model, backend credentials, Railway access, or live service.

Local image identities and layer evidence

albert-docs-full:control-6829039469

Linux AMD64 manifest: sha256:532712ccb8b7c2044f5534f51a367b91e256fc1b6c6932fe8e0a49babecb02e7

Sum of gzip layer sizes: 554,409,182 bytes.

Layer Compressed bytes
COPY docker-entrypoint.sh /usr/local/bin/ 449
COPY /app/shell-docs/.next ./.next 119,895,746
COPY /app/shell-docs/node_modules ./node_modules 337,416,203
COPY /app/shell-docs/package.json ./ 881
COPY /app/shell-docs/public ./public 15,985,023
COPY /app/shell-docs/src/content ./src/content 1,260,794

albert-docs-standalone:trial-6829039469

Linux AMD64 manifest: sha256:70d098cf6d1fc827418f4dd31178b3758f91ee820a7e97f52023e48600750075

Sum of gzip layer sizes: 196,850,682 bytes.

Layer Compressed bytes
COPY docker-entrypoint.sh /usr/local/bin/ 449
COPY /app/shell-docs/.next/standalone/ /app/ 90,889,026
COPY /app/shell-docs/.next/static ./.next/static 8,865,307
COPY /app/shell-docs/public ./public 15,985,028
COPY /app/shell-docs/src/content ./src/content 1,260,786

The OS/Node base image is identical in both builds.

Local OCI index digests:

  • Control: sha256:2de83afffeea29d6fb3ea357f9ffc3e6b462dda2e9a76d510ceb8b2d9446593c
  • Trial: sha256:8ee84bd7fd768f4348ec306854a955803bcc05c6735be781a20228c0bd6963a7

Additional isolated runtime evidence

A separate disposable container launched the generated server.js with docker run --rm --network none --platform linux/amd64, without publishing a host port. It discovered the dedicated component links from the catalog index, required exactly 59 distinct pages, and checked all 59 for HTTP 200 plus their Props section.

64 HTTP checks passed: the catalog index, 59 component pages, two Markdown endpoints, llms.txt, and sitemap.xml.

The following generated aliases all existed and resolved:

  • .next/node_modules/next-mdx-remote-53ad903680e5eefa → ../../../shell-docs/node_modules/next-mdx-remote
  • .next/node_modules/shiki-1d93e12c152e1c92 → ../../../shell-docs/node_modules/streamdown/node_modules/shiki
  • .next/node_modules/shiki-9d074a75d82e0a5b → ../../../shell-docs/node_modules/shiki

Runtime node_modules checks confirmed these build-only packages were absent: typescript, vitest, tsx, and @next/swc-linux-x64-gnu.

All 64 HTTP results from the matched trial
Route HTTP Response bytes Assertion
/generative-ui/components/standard-catalog 200 215816 expected marker
/generative-ui/components/standard-catalog/box 200 125887 expected marker
/generative-ui/components/standard-catalog/card 200 126711 expected marker
/generative-ui/components/standard-catalog/carousel 200 138829 expected marker
/generative-ui/components/standard-catalog/column 200 125781 expected marker
/generative-ui/components/standard-catalog/divider 200 122377 expected marker
/generative-ui/components/standard-catalog/flow 200 131622 expected marker
/generative-ui/components/standard-catalog/grid 200 131544 expected marker
/generative-ui/components/standard-catalog/row 200 125906 expected marker
/generative-ui/components/standard-catalog/spacer 200 121599 expected marker
/generative-ui/components/standard-catalog/tabs 200 121968 expected marker
/generative-ui/components/standard-catalog/badge 200 122665 expected marker
/generative-ui/components/standard-catalog/blockquote 200 121743 expected marker
/generative-ui/components/standard-catalog/bold 200 121649 expected marker
/generative-ui/components/standard-catalog/caption 200 122548 expected marker
/generative-ui/components/standard-catalog/code 200 121602 expected marker
/generative-ui/components/standard-catalog/italic 200 121538 expected marker
/generative-ui/components/standard-catalog/label 200 122567 expected marker
/generative-ui/components/standard-catalog/link 200 121721 expected marker
/generative-ui/components/standard-catalog/markdown 200 121858 expected marker
/generative-ui/components/standard-catalog/math 200 121674 expected marker
/generative-ui/components/standard-catalog/shimmer-text 200 123034 expected marker
/generative-ui/components/standard-catalog/strikethrough 200 121742 expected marker
/generative-ui/components/standard-catalog/text 200 124306 expected marker
/generative-ui/components/standard-catalog/title 200 123200 expected marker
/generative-ui/components/standard-catalog/tooltip 200 121842 expected marker
/generative-ui/components/standard-catalog/underline 200 121626 expected marker
/generative-ui/components/standard-catalog/button 200 124263 expected marker
/generative-ui/components/standard-catalog/check-box 200 122755 expected marker
/generative-ui/components/standard-catalog/choice-picker 200 123347 expected marker
/generative-ui/components/standard-catalog/date-time-input 200 123662 expected marker
/generative-ui/components/standard-catalog/form 200 125902 expected marker
/generative-ui/components/standard-catalog/pressable 200 126663 expected marker
/generative-ui/components/standard-catalog/radio 200 121843 expected marker
/generative-ui/components/standard-catalog/radio-group 200 122880 expected marker
/generative-ui/components/standard-catalog/segmented-control 200 123150 expected marker
/generative-ui/components/standard-catalog/select 200 123359 expected marker
/generative-ui/components/standard-catalog/slider 200 123146 expected marker
/generative-ui/components/standard-catalog/text-area 200 123105 expected marker
/generative-ui/components/standard-catalog/text-field 200 123517 expected marker
/generative-ui/components/standard-catalog/chart 200 125136 expected marker
/generative-ui/components/standard-catalog/list 200 125792 expected marker
/generative-ui/components/standard-catalog/map 200 122441 expected marker
/generative-ui/components/standard-catalog/table 200 128390 expected marker
/generative-ui/components/standard-catalog/audio-player 200 122032 expected marker
/generative-ui/components/standard-catalog/favicon 200 121979 expected marker
/generative-ui/components/standard-catalog/html-view 200 122033 expected marker
/generative-ui/components/standard-catalog/icon 200 122666 expected marker
/generative-ui/components/standard-catalog/image 200 124764 expected marker
/generative-ui/components/standard-catalog/svg 200 123302 expected marker
/generative-ui/components/standard-catalog/video 200 122714 expected marker
/generative-ui/components/standard-catalog/flashcard-flip 200 122121 expected marker
/generative-ui/components/standard-catalog/modal 200 122203 expected marker
/generative-ui/components/standard-catalog/popover 200 125407 expected marker
/generative-ui/components/standard-catalog/pulse-indicator 200 122642 expected marker
/generative-ui/components/standard-catalog/citation 200 122417 expected marker
/generative-ui/components/standard-catalog/entity-card 200 123764 expected marker
/generative-ui/components/standard-catalog/follow-up 200 122153 expected marker
/generative-ui/components/standard-catalog/image-grid 200 122445 expected marker
/generative-ui/components/standard-catalog/link-card 200 122526 expected marker
/generative-ui/components.md 200 8109 expected marker
/generative-ui/components/standard-catalog.md 200 11267 expected marker
/llms.txt 200 17782 expected marker
/sitemap.xml 200 577375 expected marker

Final PR revision verification

  • Packaging commit: 1f357675b260cd49acec8f5d6a7757b56b9b95fe.
  • Freshly fetched main 6cfc310041943dc12e73701c7274750c279fcefb was integrated without conflicts. Assessed PR head: 575ed88fefd3a89aa0264b1103ce97cf5259a057.
  • The three-dot diff against that main contains exactly the two packaging files: 47 insertions, 9 deletions.
  • oxfmt --check showcase/shell-docs/next.config.ts: passed.
  • oxlint showcase/shell-docs/next.config.ts: 0 warnings, 0 errors.
  • Explicit tsc --noEmit --incremental false: passed both on the host and in the fresh Linux builder.
  • Fresh Linux builder: production compilation, TypeScript, and all 232 static pages passed.
  • Fresh Linux docs unit suite: 91 files, 582 tests passed, two workers, networking disabled.
  • Commit hooks ran normally and passed; no hook bypass or history rewrite.

The fresh-builder unit run supplies 10 repository fixtures as read-only mounts (the .NET example files referenced by its test, the travel agent lockfile, and packages/runtime/package.json) and a container-only /showcase -> /app alias for tests that assume a checkout layout. These fixtures are not added to the production image.

Validation setup findings are recorded rather than hidden:

  • The first host unit run after integrating main had 579 passes and three Vue failures. Its pre-existing ignored generated registry marked Vue non-runnable and had zero runnable Vue catalog cells. Fresh builder generation marked Vue runnable and generated 22 cells; those three tests then passed.

  • The first unit run in the narrow builder had missing-fixture ENOENT errors (two suites plus one test). Supplying the exact repository fixtures and checkout alias above yielded the complete 582/582 pass. No source/test changes or skips were needed.

  • The OG-image negative-path test intentionally logs Error generating OG image: Error: render failed; that diagnostic remains present in the passing suite.

  • Final linux/amd64 runner at PR head 575ed88fefd3a89aa0264b1103ce97cf5259a057: production build and all final-image checks passed.

  • Final local image: albert-docs-standalone:pr-575ed88fef.

  • Linux AMD64 manifest: sha256:a68fa66f904b31565e55fd25e1e93683b5746ca6443d96d96bd5b0cef7afb699; OCI index: sha256:64d52d07815193ebe0ecf3c856511ed743e26ad442a9e9db46392b9979f9948b.

  • Final compressed layer sum: 200,050,016 bytes (200.1 MB). This includes the integrated main changes and regenerated Vue data; it is not substituted into the earlier matched-control percentage.

  • The additional isolated probe was repeated on this final image: 65/65 HTTP checks passed, including all 59 component pages, the earlier 64-route set, and /vue/prebuilt-components/chat with the expected CopilotChat marker. All three aliases still resolve; the four build-only packages above remain absent.

  • No test containers remain running; the local image tags are retained for reproduction.

Final-revision HTTP results (65 checks)
Route HTTP Response bytes Assertion
/generative-ui/components/standard-catalog 200 215816 expected marker
/generative-ui/components/standard-catalog/box 200 125887 expected marker
/generative-ui/components/standard-catalog/card 200 126711 expected marker
/generative-ui/components/standard-catalog/carousel 200 138829 expected marker
/generative-ui/components/standard-catalog/column 200 125781 expected marker
/generative-ui/components/standard-catalog/divider 200 122377 expected marker
/generative-ui/components/standard-catalog/flow 200 131622 expected marker
/generative-ui/components/standard-catalog/grid 200 131544 expected marker
/generative-ui/components/standard-catalog/row 200 125906 expected marker
/generative-ui/components/standard-catalog/spacer 200 121599 expected marker
/generative-ui/components/standard-catalog/tabs 200 121968 expected marker
/generative-ui/components/standard-catalog/badge 200 122665 expected marker
/generative-ui/components/standard-catalog/blockquote 200 121743 expected marker
/generative-ui/components/standard-catalog/bold 200 121649 expected marker
/generative-ui/components/standard-catalog/caption 200 122548 expected marker
/generative-ui/components/standard-catalog/code 200 121602 expected marker
/generative-ui/components/standard-catalog/italic 200 121538 expected marker
/generative-ui/components/standard-catalog/label 200 122567 expected marker
/generative-ui/components/standard-catalog/link 200 121721 expected marker
/generative-ui/components/standard-catalog/markdown 200 121858 expected marker
/generative-ui/components/standard-catalog/math 200 121674 expected marker
/generative-ui/components/standard-catalog/shimmer-text 200 123034 expected marker
/generative-ui/components/standard-catalog/strikethrough 200 121742 expected marker
/generative-ui/components/standard-catalog/text 200 124306 expected marker
/generative-ui/components/standard-catalog/title 200 123200 expected marker
/generative-ui/components/standard-catalog/tooltip 200 121842 expected marker
/generative-ui/components/standard-catalog/underline 200 121626 expected marker
/generative-ui/components/standard-catalog/button 200 124263 expected marker
/generative-ui/components/standard-catalog/check-box 200 122755 expected marker
/generative-ui/components/standard-catalog/choice-picker 200 123347 expected marker
/generative-ui/components/standard-catalog/date-time-input 200 123662 expected marker
/generative-ui/components/standard-catalog/form 200 125902 expected marker
/generative-ui/components/standard-catalog/pressable 200 126663 expected marker
/generative-ui/components/standard-catalog/radio 200 121843 expected marker
/generative-ui/components/standard-catalog/radio-group 200 122880 expected marker
/generative-ui/components/standard-catalog/segmented-control 200 123150 expected marker
/generative-ui/components/standard-catalog/select 200 123359 expected marker
/generative-ui/components/standard-catalog/slider 200 123146 expected marker
/generative-ui/components/standard-catalog/text-area 200 123105 expected marker
/generative-ui/components/standard-catalog/text-field 200 123517 expected marker
/generative-ui/components/standard-catalog/chart 200 125136 expected marker
/generative-ui/components/standard-catalog/list 200 125792 expected marker
/generative-ui/components/standard-catalog/map 200 122441 expected marker
/generative-ui/components/standard-catalog/table 200 128390 expected marker
/generative-ui/components/standard-catalog/audio-player 200 122032 expected marker
/generative-ui/components/standard-catalog/favicon 200 121979 expected marker
/generative-ui/components/standard-catalog/html-view 200 122033 expected marker
/generative-ui/components/standard-catalog/icon 200 122666 expected marker
/generative-ui/components/standard-catalog/image 200 124764 expected marker
/generative-ui/components/standard-catalog/svg 200 123302 expected marker
/generative-ui/components/standard-catalog/video 200 122714 expected marker
/generative-ui/components/standard-catalog/flashcard-flip 200 122121 expected marker
/generative-ui/components/standard-catalog/modal 200 122203 expected marker
/generative-ui/components/standard-catalog/popover 200 125407 expected marker
/generative-ui/components/standard-catalog/pulse-indicator 200 122642 expected marker
/generative-ui/components/standard-catalog/citation 200 122417 expected marker
/generative-ui/components/standard-catalog/entity-card 200 123764 expected marker
/generative-ui/components/standard-catalog/follow-up 200 122153 expected marker
/generative-ui/components/standard-catalog/image-grid 200 122445 expected marker
/generative-ui/components/standard-catalog/link-card 200 122526 expected marker
/generative-ui/components.md 200 8109 expected marker
/generative-ui/components/standard-catalog.md 200 11267 expected marker
/llms.txt 200 17772 expected marker
/sitemap.xml 200 589968 expected marker
/vue/prebuilt-components/chat 200 172668 expected marker
Reproduce the final Linux image and isolated runtime probe

Check out PR head 575ed88fefd3a89aa0264b1103ce97cf5259a057, then run from the repository root:

docker buildx build --platform linux/amd64 --load \
  --tag docs-standalone:trial \
  --file showcase/shell-docs/Dockerfile \
  --build-arg COMMIT_SHA=575ed88fefd3a89aa0264b1103ce97cf5259a057 \
  --build-arg BRANCH=contextablemark/docs-standalone-packaging .

The Dockerfile itself runs the network-isolated final-image route/asset assertions. For the extended 65-route probe:

docker run --rm --network none --platform linux/amd64 \
  --entrypoint node -i docs-standalone:trial --input-type=module - <<'JS'
import {spawn} from 'node:child_process';
import {connect} from 'node:net';
import {setTimeout as delay} from 'node:timers/promises';
import fs from 'node:fs';
let logs='';
const server=spawn(process.execPath,['server.js'],{env:{...process.env,HOSTNAME:'127.0.0.1'},stdio:['ignore','pipe','pipe']});
for(const s of [server.stdout,server.stderr])s.on('data',b=>{logs=(logs+b).slice(-5000)});
const results=[];
try{
 const deadline=Date.now()+30000;
 for(;;){
  const up=await new Promise(resolve=>{const s=connect(10000,'127.0.0.1');s.once('connect',()=>{s.destroy();resolve(true)});s.once('error',()=>{s.destroy();resolve(false)})});
  if(up)break;
  if(Date.now()>deadline||server.exitCode!==null)throw Error('server not ready');
  await delay(100);
 }
 async function get(path,marker){const r=await fetch('http://127.0.0.1:10000'+path,{redirect:'error',signal:AbortSignal.timeout(30000)});const body=await r.text();results.push({path,status:r.status,bytes:Buffer.byteLength(body),marker:marker?body.includes(marker):undefined});if(r.status!==200||(marker&&!body.includes(marker)))throw Error('Bad route '+path+' status '+r.status);return body;}
 const index=await get('/generative-ui/components/standard-catalog','standardUI');
 const prefix='/generative-ui/components/standard-catalog/';
 const paths=[...new Set([...index.matchAll(/href="([^"]+)"/g)].map(m=>m[1].split('#')[0]).filter(p=>p.startsWith(prefix)))];
 if(paths.length!==59)throw Error('Expected 59 standalone pages, found '+paths.length);
 for(const path of paths)await get(path,'id="props"');
 await get('/generative-ui/components.md','Let your agent render your React components');
 await get('/generative-ui/components/standard-catalog.md','standardUI');
 await get('/llms.txt','CopilotKit');
 await get('/sitemap.xml','<urlset');
 await get('/vue/prebuilt-components/chat','CopilotChat');
 const aliases=fs.readdirSync('.next/node_modules').filter(x=>/shiki|next-mdx-remote/.test(x)).map(x=>({name:x,target:fs.readlinkSync('.next/node_modules/'+x),resolved:fs.existsSync('.next/node_modules/'+x)}));
 if(aliases.length!==3||aliases.some(x=>!x.resolved))throw Error('Unresolved external alias');
 const omitted=['typescript','vitest','tsx','@next/swc-linux-x64-gnu'].map(x=>({package:x,present:fs.existsSync('node_modules/'+x)}));
 console.log(JSON.stringify({ok:true,catalogPages:paths.length,httpChecks:results.length,results,aliases,buildOnlyPackages:omitted}));
}catch(e){console.error(JSON.stringify({ok:false,error:String(e),results,logTail:logs}));process.exitCode=1}
finally{server.kill('SIGTERM');}
JS

For the full docs unit suite, the existing test / unit-shell-docs CI workflow documents the fresh-checkout dependency installation and generation steps. The 582-test Linux result above used the builder's freshly generated data and only the read-only checkout fixtures described above.

Limits and deployment behavior

  • The local experiment verifies Linux container packaging, server rendering, route content, raw Markdown, and representative asset delivery. It does not verify browser hydration or interactive behavior.
  • No Railway deployment, restart, redeploy, variable change, image-tag advance, pin promotion, workflow dispatch, or merge was performed. No Railway cold-pull/cache-hit/activation-time claim is made.
  • The existing PR Docker workflow builds linux/amd64 with push: false; the final-image assertions execute during that build. The main-branch Showcase publish/redeploy workflow remains unchanged.
  • Local no-credential runtime checks emitted the existing missing-NEXT_PUBLIC_SHELL_URL fallback diagnostic; the asserted routes still passed. This PR does not change runtime configuration.
  • The earlier MDX failure fixed by fix(docs): preserve runtime module links in the container #8054 was a broken relative alias after flattening the runner layout. This packaging change preserves the corrected layout.
  • The separate finding that early COMMIT_SHA build arguments invalidate dependency-install caching is deliberately excluded from this packaging experiment.

PR CI

CI runs for head 575ed88fefd3a89aa0264b1103ce97cf5259a057:

These were in progress when the PR was created. The completed local results above are independent of these GitHub checks; their current status is available at the links. No merge or Railway deployment was performed.

Summary by CodeRabbit

  • Improvements
    • The documentation showcase now serves its pages, Markdown content, and static assets from a standalone deployment. Build checks also verify that pages respond correctly and referenced assets are available and non-empty.
  • Bug Fixes
    • Deployment checks now catch missing documentation content, incorrect page responses, and unavailable or empty assets before the build completes.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 575ed88 and e1f5891.

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 shell-docs image now uses Next.js standalone output and starts server.js. Its runtime check verifies component pages, Markdown content, and referenced static assets.

Changes: Standalone Runtime

Layer / File(s) Summary
Configure and package standalone server
showcase/shell-docs/next.config.ts, showcase/shell-docs/Dockerfile
Next.js enables standalone output and sets the tracing root. The Docker runner copies the standalone build and starts server.js.
Verify routes and assets
showcase/shell-docs/Dockerfile
The runtime check validates page responses and Markdown content. It extracts JavaScript and CSS references and checks that those assets and the overview image return non-empty responses.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Refactor

Possibly related PRs

  • CopilotKit/CopilotKit#8039: Sets the Turbopack root to the parent of showcase/shell-docs, matching the relative-module layout used by standalone tracing.
  • CopilotKit/CopilotKit#8054: Changes the same Dockerfile and adds an isolated production-server check; this PR continues the packaging and runtime-check work.

Suggested reviewers: jpr5, bentaylordev

Merge Risk: Minimal · previous review 575ed

Standalone packaging reduces image size; no merge-blocking risk was identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "perf(docs): shrink the runtime image with standalone output" matches the main change. The PR switches the shell-docs Dockerfile and next.config.ts to Next.js standalone output, and the runt…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "perf(docs): shrink the runtime image with standalone output" matches the main change. The PR switches the shell-docs Dockerfile and next.config.ts to Next.js standalone output, and the runtime image shrinks as a result. The author reports compressed layer sizes dropping from 554,409,182 to 196,850,682 bytes in a local Linux/amd64 experiment. The title is concise, specific, and uses a conventional commit prefix. It does not mention the preserved /app/shell-docs layout or the expanded runtime checks, but those are secondary details.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • 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.

Share
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 6cfc310 and 575ed88.

Files selected for processing: 2
  • showcase/shell-docs/Dockerfile
  • showcase/shell-docs/next.config.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Production Digest-Pinning Audit

All 43 services digest-pinned.

Run 2026-11-04 06:17:10 PST — 0 finding(s).

@mme mme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, this looks right to me. server.js ends up at /app/shell-docs/server.js with the static files, public and the content next to it, and the extended smoke test in the build (Markdown, JS/CSS, a public image) is a nice addition.

One thing I'd like to confirm before approving: the old command pinned the port (next start -p 10000), while the standalone server.js listens on PORT. The image sets PORT=10000, but if Railway injects its own PORT into the service at runtime, that value wins. If the docs domain's target port is fixed at 10000, the deploy would return 502s. Could you check the service's variables and target port, or set PORT=10000 on the service? I can't see the Railway config, so this may well be fine already. Happy to approve once that's confirmed.

Copy link
Copy Markdown
Contributor Author

Thanks for checking this, @mme. I verified Railway: staging and production both already have PORT=10000, including inside the running containers, and docs.copilotkit.ai explicitly targets port 10000. Staging has no target-port override. The Button page returned 200 from localhost:10000 and through both public domains, so the ports line up for the standalone server. No config changes needed.

@pkg-pr-new

pkg-pr-new Bot commented Nov 4, 2026

Copy link
Copy Markdown
@copilotkit/a2ui-renderer

pnpm add https://pkg.pr.new/@copilotkit/a2ui-renderer@8064

@copilotkit/agentcore-runner

pnpm add https://pkg.pr.new/@copilotkit/agentcore-runner@8064

@copilotkit/angular

pnpm add https://pkg.pr.new/@copilotkit/angular@8064

@copilotkit/channels

pnpm add https://pkg.pr.new/@copilotkit/channels@8064

@copilotkit/channels-core

pnpm add https://pkg.pr.new/@copilotkit/channels-core@8064

@copilotkit/channels-discord

pnpm add https://pkg.pr.new/@copilotkit/channels-discord@8064

@copilotkit/channels-intelligence

pnpm add https://pkg.pr.new/@copilotkit/channels-intelligence@8064

@copilotkit/channels-slack

pnpm add https://pkg.pr.new/@copilotkit/channels-slack@8064

@copilotkit/channels-teams

pnpm add https://pkg.pr.new/@copilotkit/channels-teams@8064

@copilotkit/channels-ui

pnpm add https://pkg.pr.new/@copilotkit/channels-ui@8064

@copilotkit/channels-whatsapp

pnpm add https://pkg.pr.new/@copilotkit/channels-whatsapp@8064

@copilotkit/core

pnpm add https://pkg.pr.new/@copilotkit/core@8064

@copilotkit/intelligence-langgraph

pnpm add https://pkg.pr.new/@copilotkit/intelligence-langgraph@8064

@copilotkit/intelligence-mastra

pnpm add https://pkg.pr.new/@copilotkit/intelligence-mastra@8064

@copilotkit/learning

pnpm add https://pkg.pr.new/@copilotkit/learning@8064

@copilotkit/mcp-apps-renderer

pnpm add https://pkg.pr.new/@copilotkit/mcp-apps-renderer@8064

@copilotkit/react-core

pnpm add https://pkg.pr.new/@copilotkit/react-core@8064

@copilotkit/react-native

pnpm add https://pkg.pr.new/@copilotkit/react-native@8064

@copilotkit/react-textarea

pnpm add https://pkg.pr.new/@copilotkit/react-textarea@8064

@copilotkit/react-ui

pnpm add https://pkg.pr.new/@copilotkit/react-ui@8064

@copilotkit/runtime

pnpm add https://pkg.pr.new/@copilotkit/runtime@8064

@copilotkit/runtime-client-gql

pnpm add https://pkg.pr.new/@copilotkit/runtime-client-gql@8064

@copilotkit/sdk-js

pnpm add https://pkg.pr.new/@copilotkit/sdk-js@8064

@copilotkit/shared

pnpm add https://pkg.pr.new/@copilotkit/shared@8064

@copilotkit/sqlite-runner

pnpm add https://pkg.pr.new/@copilotkit/sqlite-runner@8064

@copilotkit/voice

pnpm add https://pkg.pr.new/@copilotkit/voice@8064

@copilotkit/vue

pnpm add https://pkg.pr.new/@copilotkit/vue@8064

@copilotkit/web-components

pnpm add https://pkg.pr.new/@copilotkit/web-components@8064

@copilotkit/web-inspector

pnpm add https://pkg.pr.new/@copilotkit/web-inspector@8064

commit: e1f5891

@tylerslaton
tylerslaton disabled auto-merge November 4, 2026 14:34
@tylerslaton
tylerslaton added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit e43fc79 Nov 4, 2026
31 checks passed
@tylerslaton
tylerslaton deleted the contextablemark/docs-standalone-packaging branch November 4, 2026 14:46
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.

3 participants