@@ -9,6 +9,7 @@ const mocks = vi.hoisted(() => ({
99 pluginId : string ;
1010 message : string ;
1111 } > ,
12+ missingConfiguredChannelIds : [ ] as string [ ] ,
1213 missingOfficialExternalChannels : new Set < string > ( ) ,
1314} ) ) ;
1415
@@ -28,9 +29,12 @@ vi.mock("../../channels/plugins/read-only.js", () => ({
2829 resolveReadOnlyChannelPluginsForConfig : ( ) => ( {
2930 plugins : mocks . listReadOnlyChannelPluginsForConfig ( ) ,
3031 configuredChannelIds : [ ] ,
31- missingConfiguredChannelIds : mocks . readOnlyChannelLoadFailures . map (
32- ( failure ) => failure . channelId ,
33- ) ,
32+ missingConfiguredChannelIds : [
33+ ...new Set ( [
34+ ...mocks . missingConfiguredChannelIds ,
35+ ...mocks . readOnlyChannelLoadFailures . map ( ( failure ) => failure . channelId ) ,
36+ ] ) ,
37+ ] ,
3438 loadFailures : mocks . readOnlyChannelLoadFailures ,
3539 } ) ,
3640} ) ) ;
@@ -55,6 +59,7 @@ describe("buildChannelsTable", () => {
5559 beforeEach ( ( ) => {
5660 vi . clearAllMocks ( ) ;
5761 mocks . readOnlyChannelLoadFailures = [ ] ;
62+ mocks . missingConfiguredChannelIds = [ ] ;
5863 mocks . missingOfficialExternalChannels . clear ( ) ;
5964 mocks . listReadOnlyChannelPluginsForConfig . mockReturnValue ( [ discordPlugin ] ) ;
6065 mocks . resolveInspectedChannelAccount . mockResolvedValue ( {
@@ -173,4 +178,25 @@ describe("buildChannelsTable", () => {
173178 expect ( table . rows ) . toStrictEqual ( [ ] ) ;
174179 expect ( mocks . resolveInspectedChannelAccount ) . not . toHaveBeenCalled ( ) ;
175180 } ) ;
181+
182+ it ( "keeps configured channels visible when fast status skips setup fallback plugins" , async ( ) => {
183+ mocks . listReadOnlyChannelPluginsForConfig . mockReturnValue ( [ ] ) ;
184+ mocks . missingConfiguredChannelIds = [ "telegram" ] ;
185+
186+ const table = await buildChannelsTable (
187+ { channels : { telegram : { botToken : "123:abc" } } } ,
188+ { includeSetupFallbackPlugins : false } ,
189+ ) ;
190+
191+ expect ( table . rows ) . toStrictEqual ( [
192+ {
193+ id : "telegram" ,
194+ label : "telegram" ,
195+ enabled : true ,
196+ state : "setup" ,
197+ detail : "configured; status unavailable in fast mode" ,
198+ } ,
199+ ] ) ;
200+ expect ( mocks . resolveInspectedChannelAccount ) . not . toHaveBeenCalled ( ) ;
201+ } ) ;
176202} ) ;
0 commit comments