@@ -105,6 +105,31 @@ function demoUsage(period = "24h") {
105105 } ;
106106}
107107
108+ function demoActiveRequests ( ) {
109+ return [
110+ {
111+ id : "request-demo-chatgpt" ,
112+ model : "coding" ,
113+ stream : true ,
114+ startedAt : demoStartedAt - 4_200 ,
115+ providerId : "prov_chatgpt_demo" ,
116+ providerType : "chatgpt" ,
117+ providerName : "ChatGPT Plus" ,
118+ upstreamModel : "gpt-5" ,
119+ } ,
120+ {
121+ id : "request-demo-claude" ,
122+ model : "claude/claude-sonnet-4-5" ,
123+ stream : true ,
124+ startedAt : demoStartedAt - 1_800 ,
125+ providerId : "prov_claude_demo" ,
126+ providerType : "claude" ,
127+ providerName : "Claude Pro" ,
128+ upstreamModel : "claude-sonnet-4-5" ,
129+ } ,
130+ ] ;
131+ }
132+
108133let demoLogEntries = [
109134 { at : Date . now ( ) - 35_000 , level : "info" , msg : "Gateway request completed" , meta : { route : "coding" , status : 200 } } ,
110135 { at : Date . now ( ) - 7 * 60_000 , level : "info" , msg : "OAuth token refreshed" , meta : { provider : "ChatGPT Plus" } } ,
@@ -242,6 +267,7 @@ function registerIpc() {
242267 combos : ( cfg . combos || [ ] ) . map ( publicCombo ) ,
243268 stats : demoStats ( ) ,
244269 usage : demoUsage ( ) ,
270+ activeRequests : demoActiveRequests ( ) ,
245271 unlocked : true ,
246272 hasAdminPassword : false ,
247273 oauthProviders : Object . keys ( OAUTH ) . map ( ( k ) => ( { id : k , name : OAUTH [ k ] . name } ) ) ,
@@ -709,18 +735,22 @@ app.whenReady().then(async () => {
709735 await win . webContents . executeJavaScript ( `
710736 (() => {
711737 const details = document.querySelector("[data-home-credentials]");
712- const routeMap = document.querySelector("[data-home-route-map ]");
713- const track = routeMap ?.querySelector(".route-track ");
738+ const routeStage = document.querySelector("[data-live-router-stage ]");
739+ const path = routeStage ?.querySelector(".live-request-path ");
714740 const copyButton = document.getElementById("copy-url");
715- if (!details || !routeMap || !track || !copyButton) {
741+ if (
742+ !details ||
743+ !routeStage ||
744+ !path ||
745+ routeStage.querySelectorAll(".live-request-path").length !== 2 ||
746+ routeStage.querySelectorAll(".live-provider").length !== 5 ||
747+ !copyButton
748+ ) {
716749 throw new Error("Status persistence controls did not render");
717750 }
718751 details.open = true;
719752 copyButton.focus();
720- window.__rr_home_poll_test = { routeMap, track, copyButton, animationStarts: 0 };
721- routeMap.addEventListener("animationstart", () => {
722- window.__rr_home_poll_test.animationStarts += 1;
723- });
753+ window.__rr_home_poll_test = { routeStage, path, copyButton };
724754 return true;
725755 })()
726756 ` ) ;
@@ -729,16 +759,13 @@ app.whenReady().then(async () => {
729759 (() => {
730760 const test = window.__rr_home_poll_test;
731761 const details = document.querySelector("[data-home-credentials]");
732- if (document.querySelector("[data-home-route-map ] .route-track ") !== test.track ) {
733- throw new Error("Status polling replaced the route animation DOM ");
762+ if (document.querySelector("[data-live-router-stage ] .live-request-path ") !== test.path ) {
763+ throw new Error("Status polling replaced an unchanged live request path ");
734764 }
735765 if (!details?.open) throw new Error("Status polling collapsed Credentials and network");
736766 if (document.activeElement !== test.copyButton) {
737767 throw new Error("Status polling moved focus away from the endpoint controls");
738768 }
739- if (test.animationStarts !== 0) {
740- throw new Error("Status polling restarted the route animation without new traffic");
741- }
742769 return true;
743770 })()
744771 ` ) ;
0 commit comments