update sidebar
This commit is contained in:
@@ -602,9 +602,10 @@ client.subscribe(filter).with_id(sub_id).await?;
|
||||
`crates/community`.** `concord` has no subscriptions, no `init`, and no
|
||||
`Entity<Community>`; `community::CommunityRegistry` owns one `Entity<Community>`
|
||||
per state document, subscribes when a community's plane set changes, and
|
||||
re-folds on an inbound wrap. The sidebar observes the registry, logs
|
||||
`CommunityEvent::Error` through `log::error!`, and its "New community" row opens
|
||||
a name prompt that calls `CommunityRegistry::create`. `create` persists the
|
||||
re-folds on an inbound wrap. The sidebar subscribes to the registry, surfaces
|
||||
`CommunityEvent::Error` as a window notification, and its "New community" row
|
||||
in the Communities tab dispatches `Command::NewCommunity`, whose name prompt
|
||||
calls `CommunityRegistry::create`. `create` persists the
|
||||
genesis locally, publishes the wraps to the community's relays, and records the
|
||||
membership in the account's Community List — all best-effort, so a relay that is
|
||||
down warns without losing the community. Discovery
|
||||
|
||||
@@ -205,7 +205,7 @@ Empty list shows the existing "No communities yet" hint.
|
||||
|
||||
Each phase is independently reviewable and leaves the app runnable.
|
||||
|
||||
### Phase 1 — tab shell
|
||||
### Phase 1 — tab shell — DONE
|
||||
|
||||
Files: `crates/workspace/src/sidebar/mod.rs`,
|
||||
`crates/workspace/src/sidebar/tab.rs` (new), `sidebar/tree.rs`,
|
||||
@@ -228,7 +228,7 @@ Files: `crates/workspace/src/sidebar/mod.rs`,
|
||||
Validation: app runs signed in and signed out; chats and communities list and
|
||||
open as before; tab switching works; requests dot still clears.
|
||||
|
||||
### Phase 2 — Recents tab
|
||||
### Phase 2 — Recents tab — DONE
|
||||
|
||||
Files: `crates/settings/src/lib.rs`, `crates/workspace/src/sidebar/mod.rs`,
|
||||
`sidebar/tree.rs`.
|
||||
@@ -242,7 +242,7 @@ Files: `crates/settings/src/lib.rs`, `crates/workspace/src/sidebar/mod.rs`,
|
||||
Validation: `cargo test -p settings`; manually open communities, restart, and
|
||||
confirm the Recents order; confirm ≤3 / ≤5 rendering and both "Show all" rows.
|
||||
|
||||
### Phase 3 — tab actions
|
||||
### Phase 3 — tab actions — DONE
|
||||
|
||||
Files: `crates/workspace/src/dialogs/new_chat.rs` (new),
|
||||
`dialogs/new_community.rs` (new), `crates/workspace/src/dialogs/mod.rs`,
|
||||
@@ -264,7 +264,7 @@ Validation: create a chat from an npub and confirm the room opens; create a
|
||||
community and confirm it appears in the Communities tab and in Recents;
|
||||
requests/contacts/browse still dispatch.
|
||||
|
||||
### Phase 4 — onboarding sidebar
|
||||
### Phase 4 — onboarding sidebar — DONE, except `Join now`
|
||||
|
||||
Files: `crates/state/src/lib.rs`, `crates/workspace/src/sidebar/mod.rs`,
|
||||
`sidebar/onboarding.rs` (new), `crates/workspace/src/dialogs/create_identity.rs`
|
||||
@@ -291,7 +291,11 @@ Validation: with no stored credentials the sidebar shows onboarding and no
|
||||
modal; `Import identity` still signs in; `Join now` signs in with a fresh key;
|
||||
with bunker credentials the tabs appear without an onboarding flash.
|
||||
|
||||
### Phase 5 — polish and cleanup
|
||||
**Deferred.** `dialogs/create_identity.rs` is not implemented, so `Join now`
|
||||
renders without a click handler, and the §2.1 banner assets were skipped in
|
||||
favor of a plain theme-colored background with the brand mark.
|
||||
|
||||
### Phase 5 — polish and cleanup — DONE
|
||||
|
||||
- Reposition the "Getting messages…" pill above the tab bar.
|
||||
- Empty states and counts for all three tabs; truncation rules (§3).
|
||||
|
||||
Reference in New Issue
Block a user