Skip to content

fix(#92,#93,#203): validate channel names, improve empty-state copy, and add agent guide#217

Merged
zoorpha merged 4 commits into
mainfrom
fix/channel-validation-empty-state
Jul 6, 2026
Merged

fix(#92,#93,#203): validate channel names, improve empty-state copy, and add agent guide#217
zoorpha merged 4 commits into
mainfrom
fix/channel-validation-empty-state

Conversation

@zoorpha

@zoorpha zoorpha commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Closes #92, closes #93, closes #203.

Backend (#92)

  • Adds validate_channel_name() in backend/src/api/v4/channels/crud.rs and calls it from create_channel.
  • Rejects empty/whitespace-only names, names longer than 64 characters, and names containing characters other than lowercase letters, numbers, hyphens and underscores.
  • Trims whitespace-padded valid names before persisting; adds a test that " trimmed-channel " returns 200 and is stored as "trimmed-channel".
  • Adds integration test create_channel_rejects_invalid_names in backend/tests/api_v4_channels_all.rs covering empty, whitespace-only, over-long and invalid-character names (all 400), plus a valid-name regression guard (200).

Frontend (#93)

  • Replaces the sidebar "No channels" placeholder with friendly, actionable copy: "No channels yet" / "Create your first channel or browse existing ones to get started."

Contributor / Agent Workflow (#203)

  • Creates canonical root AGENTS.md with repo map, CI-aligned validation commands, and AI-agent change boundaries.
  • Links README.md and CONTRIBUTING.md to AGENTS.md.
  • Adds docs/agent-guides/README.md as a thin index to existing guides.
  • Deprecates docs/internal/AGENTS.md in favor of the root file.

Verification

  • cargo test --test api_v4_channels_all passes.
  • cargo fmt --all -- --check, cargo clippy --all-targets --all-features -- -D warnings, and cargo test --lib pass.
  • npm run docs:check-links, npm run docs:check-config, and npm run docs:build pass.
  • Frontend build/unit tests were not run in this environment due to Node version constraints.

@zoorpha zoorpha requested a review from senolcolak as a code owner July 6, 2026 11:22
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 6, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
docs-rustchat-io b967a5e Commit Preview URL

Branch Preview URL
Jul 06 2026, 02:55 PM

- Add server-side validation for channel names in v4 create_channel:
  non-empty, <= 64 chars, lowercase letters/numbers/hyphens/underscores.
- Add integration test covering empty, whitespace-only, over-long and
  invalid-character names, plus a valid-name regression guard.
- Replace the sidebar 'No channels' placeholder with friendly copy that
  explains no channels exist and points users to create or browse.

Signed-off-by: zoorpha <aaron@kubedo.com>
@zoorpha zoorpha force-pushed the fix/channel-validation-empty-state branch from 30c2043 to 6179a0d Compare July 6, 2026 11:48
senolcolak
senolcolak previously approved these changes Jul 6, 2026
- Create canonical root AGENTS.md with repo map, validation commands,

  and AI-agent change boundaries.

- Link README.md and CONTRIBUTING.md to AGENTS.md.

- Add docs/agent-guides/README.md as a thin index to existing guides.

- Deprecate docs/internal/AGENTS.md in favor of the root file.

Signed-off-by: zoorpha <aaron@kubedo.com>
@zoorpha zoorpha changed the title fix(#92,#93): validate channel names and improve empty-state copy fix(#92,#93,#203): validate channel names, improve empty-state copy, and add agent guide Jul 6, 2026
senolcolak
senolcolak previously approved these changes Jul 6, 2026
- Replace relative ../../AGENTS.md links with absolute GitHub URLs so

  Vitepress no longer reports dead links when building the docs site.

- Update agent-model.md links from rustchatio/rustchat to kubedoio/rustchat.

Signed-off-by: zoorpha <aaron@kubedo.com>
senolcolak
senolcolak previously approved these changes Jul 6, 2026
@senolcolak

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c3d29a1b60

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend/src/api/v4/channels/crud.rs
Comment thread docs/agent-guides/README.md
- Trim the channel name before validating and pass the normalized value

  to ChannelRepository::create so whitespace-padded valid names are stored

  without leading/trailing spaces instead of falling through to the DB

  unique constraint.

- Add integration-test assertion that whitespace-padded names return 200

  and are stored trimmed.

Signed-off-by: zoorpha <aaron@kubedo.com>
@zoorpha zoorpha merged commit 21ae679 into main Jul 6, 2026
25 checks passed
@zoorpha zoorpha deleted the fix/channel-validation-empty-state branch July 6, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants