#5622: fix(onboard): parse space-separated channel allowlist entries
Cluster:
Signal and Discord Fixes
## Summary
Fixes #5617
The channel allowlist prompt during `openclaw onboard` says "comma-separated" but users often enter space-separated values like `#ryan #openclaw-discussion`. Previously this was saved as a single config key, causing channel matching to fail silently.
**Before:** `"#ryan #openclaw-discussion": { "allow": true }` (one broken key)
**After:** `"#ryan": { "allow": true }, "#openclaw-discussion": { "allow": true }` (two correct keys)
## Changes
- Updated `parseAllowlistEntries()` to split on comma, semicolon, space, or newline
- Added comprehensive test coverage for the parsing function
## Test plan
- [x] All 14 new tests pass
- [x] Verified fix handles: comma-separated, space-separated, semicolon-separated, newline-separated, and mixed inputs
- [x] Edge cases covered: empty input, single entry, extra whitespace
🦞 Generated with [Claude Code](https://claude.ai/claude-code)
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR fixes `openclaw onboard` allowlist parsing so users can enter channels separated by spaces (and other common separators) instead of only commas/newlines. The core change updates `parseAllowlistEntries()` to split on commas, semicolons, and whitespace, and adds a new `channel-access.test.ts` suite with a range of parsing/formatting cases.
This fits into the onboarding plugin by ensuring `promptChannelAllowlist()` produces a normalized `string[]` even when user input doesn’t match the prompt’s stated “comma-separated” format, preventing silent allowlist mismatches in downstream channel matching logic.
<h3>Confidence Score: 4/5</h3>
- This PR is likely safe to merge and should fix the reported onboarding allowlist parsing issue.
- Change is localized to a small helper function and adds targeted unit tests. The main risk is subtle over-splitting due to using `\s` (broader than space/newline) and the tests using type casts for null/undefined despite the function being typed as `string`.
- src/channels/plugins/onboarding/channel-access.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#17878: Refactor: share allowlist normalization
by iyoda · 2026-02-16
75.8%
#21271: fix(commands): pass channel/capabilities/shell/os to runtime in com...
by evansantos · 2026-02-19
74.0%
#12204: fix(discord): resolve numeric guildId/channelId pairs in channel al...
by mcaxtr · 2026-02-09
73.3%
#13881: fix: Address Greptile feedback - test isolation and channel resolution
by trevorgordon981 · 2026-02-11
73.3%
#8024: fix(slack): resolve channel names via directory for cross-account m...
by emma-digital-assistant · 2026-02-03
73.3%
#23155: fix: add modelByChannel to allowed channel config keys
by tiagocampo · 2026-02-22
73.1%
#17770: refactor(cli): reuse shared option builders
by iyoda · 2026-02-16
73.1%
#4878: fix: string/type handling and API fixes (#4537, #4380, #4373, #4547...
by lailoo · 2026-01-30
73.0%
#22591: feat(cli): expose Discord channel lifecycle management through unif...
by yinghaosang · 2026-02-21
72.6%
#12308: fix(cli): redirect log output to stderr during completion script ge...
by mcaxtr · 2026-02-09
72.3%