File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,9 +32,8 @@ pub fn App() -> Element {
3232 // real client can replace the mock without touching consumers.
3333 let service: Rc < dyn ConnectionService > = Rc :: new ( MockConnectionService ) ;
3434
35- // Prove the real-client stub is instantiable and object-safe behind the
36- // seam (SEAM-02). Not the active impl this phase — Phase 2 swaps it in —
37- // but constructing it here guarantees it compiles against the trait.
35+ // Compile-time check: the real-client stub must be instantiable and
36+ // object-safe behind the seam trait. Not the active impl yet — the mock is.
3837 let _real: Rc < dyn ConnectionService > = Rc :: new ( NodeDbConnectionService :: default ( ) ) ;
3938
4039 use_context_provider ( || service. clone ( ) ) ;
Original file line number Diff line number Diff line change @@ -45,13 +45,13 @@ pub struct AsyncViewProps {
4545 pub empty_message : String ,
4646}
4747
48- // Consumed by the notification popover (01-04) and later wired views.
48+ // Consumed by the notification popover and later wired views.
4949#[ component]
5050pub fn AsyncView ( props : AsyncViewProps ) -> Element {
5151 if props. loading {
5252 return rsx ! { div { class: "async-loading" , "Loading…" } } ;
5353 }
54- if let Some ( msg) = props. error . clone ( ) {
54+ if let Some ( msg) = props. error {
5555 return rsx ! {
5656 div { class: "async-error" ,
5757 div { class: "async-error-msg" , "{msg}" }
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ pub fn NotificationPopover() -> Element {
120120 on_retry: move |_| feed. restart( ) ,
121121 }
122122 // Loaded -> the existing grouped list markup.
123- if state . loaded ( ) . is_some ( ) {
123+ if !groups . is_empty ( ) {
124124 for ( group_name, items) in groups {
125125 div { class: "notif-group-label" , "{group_name}" }
126126 for n in items {
Original file line number Diff line number Diff line change 1- //! The real-client-backed seam impl. Phase 1: inert stub.
2- //!
3- //! Holds an `Option<NativeClient>` (None until Phase 2 connects). While the
4- //! client is None, every method returns `StudioError::NotConnected` — never
5- //! a panic or todo!(). Phase 2 (CONN-01..07) fills the client via
6- //! ConnectionBuilder; that wiring is explicitly out of scope here.
1+ //! The real-client-backed `ConnectionService` impl. Currently an inert stub:
2+ //! every method returns `StudioError::NotConnected` until a real connection is
3+ //! opened. Holds an `Option<NativeClient>` so the type is forward-compatible
4+ //! with the future `ConnectionBuilder` wiring — no panic or `todo!()` in the interim.
75
86use async_trait:: async_trait;
97use nodedb_client:: NativeClient ;
@@ -16,8 +14,8 @@ use crate::state::connections_registry::SavedConnection;
1614
1715#[ derive( Default ) ]
1816pub struct NodeDbConnectionService {
19- /// None until a real connection is opened in Phase 2 (ConnectionBuilder
20- /// fills this). The field exists now so the seam type is forward-compatible .
17+ /// None until a real connection is opened. Field kept for forward-compatibility
18+ /// with the future `ConnectionBuilder` wiring .
2119 #[ allow( dead_code) ]
2220 client : Option < NativeClient > ,
2321}
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ pub fn ConnectionManager() -> Element {
5757 if let Ok ( session) = service. connect( & name) . await {
5858 active. set( Some ( session) ) ;
5959 }
60- // Phase 2 / CONN-03 surfaces the Err case as an error state .
60+ // Err case (e.g. offline): surfaced in a later wiring phase .
6161 } ) ;
6262 }
6363 } ,
You can’t perform that action at this time.
0 commit comments