From fe0294af4ed42aaea3b7e97d5b1cba0a4c5657af Mon Sep 17 00:00:00 2001 From: "Kim, Hyeonseo" Date: Mon, 7 Sep 2026 13:29:26 +0900 Subject: [PATCH 1/4] Apply View Detail and localInstance query on workspace page --- .../web/src/components/InstanceSummary.tsx | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/packages/web/src/components/InstanceSummary.tsx b/packages/web/src/components/InstanceSummary.tsx index 8314684..b0b222d 100644 --- a/packages/web/src/components/InstanceSummary.tsx +++ b/packages/web/src/components/InstanceSummary.tsx @@ -31,6 +31,9 @@ export default function InstanceSummary(props: { fragment InstanceSummary_instance on Instance { id host + localInstance { + slug + } } `, () => props.$instance, @@ -45,13 +48,17 @@ export default function InstanceSummary(props: {

Instance host

{instance().host}

- - Create actors - - + + {(localInstance) => ( + + View Detail + + + )} + )} From 7ef3cf47f76a952606e861c0c7e2d1fb7dea35fd Mon Sep 17 00:00:00 2001 From: "Kim, Hyeonseo" Date: Mon, 7 Sep 2026 13:37:08 +0900 Subject: [PATCH 2/4] Add ActorDetail --- packages/web/src/components/ActorDetail.tsx | 26 +++++++++++++++++++++ packages/web/src/routes/instance/[slug].tsx | 21 ++++++++--------- 2 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 packages/web/src/components/ActorDetail.tsx diff --git a/packages/web/src/components/ActorDetail.tsx b/packages/web/src/components/ActorDetail.tsx new file mode 100644 index 0000000..ec121f1 --- /dev/null +++ b/packages/web/src/components/ActorDetail.tsx @@ -0,0 +1,26 @@ +// DrFed: A web-based platform for developing and debugging ActivityPub apps +// Copyright (C) 2026 DrFed team +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +import styles from "~/styles/instance.module.css"; + +export const ActorDetail = (props: { handle: string; host: string }) => ( +
+
+); diff --git a/packages/web/src/routes/instance/[slug].tsx b/packages/web/src/routes/instance/[slug].tsx index 49e2691..d2f6848 100644 --- a/packages/web/src/routes/instance/[slug].tsx +++ b/packages/web/src/routes/instance/[slug].tsx @@ -18,6 +18,8 @@ import { Title } from "@solidjs/meta"; import { A, useParams } from "@solidjs/router"; import { For } from "solid-js"; +import { ActorDetail } from "~/components/ActorDetail.tsx"; + import styles from "~/styles/instance.module.css"; const actors = ["@sherry", "@newsroom", "@garden"] as const; @@ -54,21 +56,25 @@ export default function InstanceDetailPage() {
NodeInfo
- /nodeinfo/2.1 + + {`https://${host()}/nodeinfo/2.1`} +
WebFinger
- /.well-known/webfinger + {`https://${host()}/.well-known/webfinger`}
Shared inbox
- /inbox + {`https://${host()}/inbox`}
@@ -85,14 +91,7 @@ export default function InstanceDetailPage() {
- {(handle) => ( -
-
- )} + {(handle) => }
From 6308fae34694a9c98deacfab8d6dfb755ef177b4 Mon Sep 17 00:00:00 2001 From: "Kim, Hyeonseo" Date: Mon, 7 Sep 2026 13:58:39 +0900 Subject: [PATCH 3/4] Apply query to instance detail page --- packages/web/src/components/ActorDetail.tsx | 35 +++- packages/web/src/routes/instance/[slug].tsx | 218 +++++++++++++------- 2 files changed, 172 insertions(+), 81 deletions(-) diff --git a/packages/web/src/components/ActorDetail.tsx b/packages/web/src/components/ActorDetail.tsx index ec121f1..af8be37 100644 --- a/packages/web/src/components/ActorDetail.tsx +++ b/packages/web/src/components/ActorDetail.tsx @@ -14,13 +14,32 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +import { graphql } from "relay-runtime"; +import { Show } from "solid-js"; +import { createFragment } from "solid-relay"; + +import type { ActorDetail_actor$key } from "./__generated__/ActorDetail_actor.graphql.ts"; + import styles from "~/styles/instance.module.css"; -export const ActorDetail = (props: { handle: string; host: string }) => ( -
-
-); +export const ActorDetail = (props: { $actor: ActorDetail_actor$key }) => { + const actorData = createFragment( + graphql` + fragment ActorDetail_actor on Actor { + handle + } + `, + () => props.$actor, + ); + + return ( + + {(actor) => ( +
+
+ )} +
+ ); +}; diff --git a/packages/web/src/routes/instance/[slug].tsx b/packages/web/src/routes/instance/[slug].tsx index d2f6848..7662570 100644 --- a/packages/web/src/routes/instance/[slug].tsx +++ b/packages/web/src/routes/instance/[slug].tsx @@ -15,86 +15,158 @@ // along with this program. If not, see . import { Title } from "@solidjs/meta"; -import { A, useParams } from "@solidjs/router"; -import { For } from "solid-js"; +import { + A, + type RouteDefinition, + type RouteSectionProps, + query, +} from "@solidjs/router"; +import { graphql } from "relay-runtime"; +import { For, Show } from "solid-js"; +import { + createPreloadedQuery, + loadQuery, + useRelayEnvironment, +} from "solid-relay"; import { ActorDetail } from "~/components/ActorDetail.tsx"; +import type { InstanceDetailQuery } from "./__generated__/InstanceDetailQuery.graphql.ts"; + import styles from "~/styles/instance.module.css"; -const actors = ["@sherry", "@newsroom", "@garden"] as const; +// Temp Query to show first 100. +const instanceDetailQuery = graphql` + query InstanceDetailQuery($slug: String!) { + localInstanceBySlug(slug: $slug) { + instance { + id + host + actors(first: 100) { + totalCount + edges { + node { + ...ActorDetail_actor + } + } + } + } + } + } +`; + +const loadInstanceDetailQuery = query( + (slug: string) => + loadQuery( + useRelayEnvironment()(), + instanceDetailQuery, + { slug }, + ), + "InstanceDetailQuery", +); + +export const route = { + preload({ params }) { + if (params.slug === undefined) { + throw new Error("Missing slug route parameter."); + } -export default function InstanceDetailPage() { - const params = useParams(); - const host = () => params.slug ?? "social.example"; + return loadInstanceDetailQuery(params.slug); + }, +} satisfies RouteDefinition; + +type RouteData = ReturnType; + +export default function InstanceDetailPage( + props: RouteSectionProps, +) { + const data = createPreloadedQuery( + instanceDetailQuery, + () => props.data, + ); + + const instanceData = () => data()?.localInstanceBySlug?.instance; return ( -
- {host()} — DrFed - - - All instances - - -
-

{host()}

- - - Create actor - -
- -
-
-

Connection record

-

Federation endpoints

-
-
- - -
-
Shared inbox
-
- {`https://${host()}/inbox`} -
-
-
-
- -
-
-
-

Local identities

-

Actors

-
-

{actors.length} registered

-
- -
- - {(handle) => } - -
-
-
+ + + All instances + +

Instance not found.

+ + } + > + {(instance) => ( +
+ {instance().host} — DrFed + + + All instances + + +
+

{instance().host}

+ + + Create actor + +
+ +
+
+

Connection record

+

Federation endpoints

+
+
+ + +
+
Shared inbox
+
+ {`https://${instance().host}/inbox`} +
+
+
+
+ +
+
+
+

Local identities

+

Actors

+
+

{instance().actors.totalCount} registered

+
+
+ + {(edge) => } + +
+
+
+ )} +
); } From d3a81d9142895794c22706c11a3c943201935031 Mon Sep 17 00:00:00 2001 From: "Kim, Hyeonseo" Date: Mon, 7 Sep 2026 17:46:58 +0900 Subject: [PATCH 4/4] Fix demo url in instance page --- packages/web/src/routes/instance/[slug].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web/src/routes/instance/[slug].tsx b/packages/web/src/routes/instance/[slug].tsx index 7662570..2b80abe 100644 --- a/packages/web/src/routes/instance/[slug].tsx +++ b/packages/web/src/routes/instance/[slug].tsx @@ -111,7 +111,7 @@ export default function InstanceDetailPage(

{instance().host}

Create actor