Repository navigation
Conversation
Adds "Import sections" to the Channels section menu. Paste an outline of section names followed by their channels (for example a Slack sidebar), preview which channels match, then create the sections and move the matched channels. Sections with the same name are reused, and starred channels stay starred. Co-authored-by: Hertz <c6741012416ef5c49a865db79682113385c5fb998e8c890234fb442b59e22748@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Joah Gerstenberg <joah@squareup.com>
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Adds Import sections to the Channels section's ⋯ menu, right after Create section. People who move from another chat app can recreate their sidebar sections in one step instead of building each section by hand.
The dialog takes a pasted outline:
:is ignored.#, a bullet (-,*,•) or an indent. Channels listed before the first section name are ignored.#, spaces and underscores. Archived channels, DMs and forums are skipped. Each channel is claimed by the first section that lists it.sidebarPreferencescreateSectionandassignpaths, one at a time. A retry after a partial failure reuses the section IDs it already generated, so it doesn't create duplicate sections.Files
src/bundled/channels/section-import.ts: outline parsing and import planning, with no UI.src/bundled/channels/ImportSidebarSections.tsx: the dialog, built from the sharedDialog,Field,TextareaandButton.SidebarSection.tsxandChannelInventory.tsx: the menu item and the dialog mount.Testing
pnpm typecheckandpnpm lintpass.vitest run src/bundled/channels: 1,167 pass, including the newsection-import.test.ts.pnpm test:browser --project=chromium sidebar-section: all 19 pass. That includes the newsidebar-section-import.spec.mjs, which pastes an outline, checks the preview and imports. It then reloads and checks that the sections and channel assignments persisted. The menu-order assertion insidebar-section-creation.spec.mjsis updated for the new item.How to test
bin/just desktopand sign in.🤖 Generated with Claude Code