feat: add optional VNC password authentication - #1072
Conversation
Removed filterEmptyMessages call and use messages directly. This fixes the build error where filteredMessages was undefined after previous partial changes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When VNC_PW is set, VNC server uses password authentication instead of running with no security. This allows securing VNC connections in environments where the server is exposed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis pull request removes empty assistant message filtering from the Copilot API route to use unfiltered messages directly throughout, and adds conditional VNC authentication to the startup script that applies password-based auth when the VNC_PW environment variable is set. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
📦 Publishable packages changed
Add |
📦 Publishable packages changed
Add |
📦 Publishable packages changed
Add |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
docs/src/app/api/copilotkit/route.ts (1)
216-220: Update the class contract after removing filtering.Line 216 removes filtering, but the class comment and
filterEmptyMessageshelper still describe the old behavior. Please align docs/implementation to avoid future regressions and confusion.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/src/app/api/copilotkit/route.ts` around lines 216 - 220, Update the documentation and helper to match the new behavior where messages are no longer filtered: revise the class/file comment that describes message filtering to reflect that empty messages are passed through to CopilotKit/Anthropic, and either remove or repurpose the filterEmptyMessages helper (or update its JSDoc and name) so it no longer claims to be used for automatic empty-message removal; ensure references to symbols like filterEmptyMessages, messages, and modifiedInput in route.ts and any related comments match this new contract.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@libs/xfce/src/scripts/start-vnc.sh`:
- Around line 8-12: After writing the VNC password file, immediately remove the
secret from the environment to prevent inheritance by child processes: in
start-vnc.sh, after creating /home/cua/.vnc/passwd, setting permissions, and
assigning SECURITY_ARGS, call unset VNC_PW (or otherwise remove it from the
environment) so the VNC_PW variable is no longer exported or visible to
children.
- Around line 10-12: In start-vnc.sh the VNC_PW assigned to vncpasswd can be
silently truncated to 8 characters; add a guard that checks the length of the
VNC_PW variable before calling vncpasswd (referencing VNC_PW and the vncpasswd
invocation that writes /home/cua/.vnc/passwd) and either reject/exit with a
clear error telling the user the 8-char limit or explicitly truncate and log a
warning, then continue to generate the passwd file and set SECURITY_ARGS as
before; ensure the message mentions the 8-character TigerVNC/vncpasswd limit so
users are informed.
---
Nitpick comments:
In `@docs/src/app/api/copilotkit/route.ts`:
- Around line 216-220: Update the documentation and helper to match the new
behavior where messages are no longer filtered: revise the class/file comment
that describes message filtering to reflect that empty messages are passed
through to CopilotKit/Anthropic, and either remove or repurpose the
filterEmptyMessages helper (or update its JSDoc and name) so it no longer claims
to be used for automatic empty-message removal; ensure references to symbols
like filterEmptyMessages, messages, and modifiedInput in route.ts and any
related comments match this new contract.
📦 Publishable packages changed
|
📦 Publishable packages changed
|
This reverts commit fd9cded.
Summary
VNC_PWenvironment variableVNC_PWis set, the VNC server usesVncAuthwith a password file; otherwise, it runs without authentication (preserving existing behavior)Test plan
VNC_PWset (no-auth mode, existing behavior)VNC_PW=somepasswordand requires password to connect🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Updates