Ship production optimization M1-M12.5A: queues, metrics, HTTP observability, and vector search reliability.
Keep similar-ai from tripping the global circuit on a lone URL 502, clamp Qdrant search to 100, and add Server-Timing plus slow-request logging. Studio shared props, Academy S3 exists caching, heat chunking, and Redis/scheduler hygiene stay in this rollout.
This commit is contained in:
@@ -33,6 +33,11 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
'stripe/*',
|
||||
]);
|
||||
|
||||
$middleware->prepend([
|
||||
\App\Http\Middleware\LogSlowHttpRequest::class,
|
||||
\App\Http\Middleware\AddServerTiming::class,
|
||||
]);
|
||||
|
||||
$middleware->web(append: [
|
||||
\App\Http\Middleware\SecurityHeaders::class,
|
||||
\App\Http\Middleware\RedirectLegacyProfileSubdomain::class,
|
||||
|
||||
+24
-3
@@ -105949,8 +105949,21 @@ const kpiConfig = [
|
||||
{ key: "comments_30d", label: "Comments", icon: "fa-solid fa-comments" },
|
||||
{ key: "followers", label: "Followers", icon: "fa-solid fa-user-group" }
|
||||
];
|
||||
function KpiCard({ config, value }) {
|
||||
return /* @__PURE__ */ React.createElement("div", { className: "rounded-[26px] border border-white/10 bg-white/[0.03] p-5 shadow-[0_18px_40px_rgba(2,6,23,0.18)]" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-3 text-slate-300" }, /* @__PURE__ */ React.createElement("div", { className: "flex h-11 w-11 items-center justify-center rounded-2xl bg-sky-300/10 text-sky-100" }, /* @__PURE__ */ React.createElement("i", { className: config.icon })), /* @__PURE__ */ React.createElement("span", { className: "text-[11px] font-semibold uppercase tracking-[0.18em] text-slate-500" }, config.label)), /* @__PURE__ */ React.createElement("p", { className: "mt-4 text-3xl font-semibold text-white tabular-nums" }, typeof value === "number" ? value.toLocaleString() : value));
|
||||
function snapshotHint(config, window2) {
|
||||
if (!window2 || !["views_30d", "appreciation_30d", "shares_30d", "comments_30d"].includes(config.key)) {
|
||||
return null;
|
||||
}
|
||||
const requested = Number(window2.requested_days || 30);
|
||||
const available = Number(window2.table_coverage_days || 0);
|
||||
const complete = Boolean(window2.window_complete);
|
||||
if (complete) {
|
||||
return `Last ${requested} days`;
|
||||
}
|
||||
const shown = Math.max(0, Math.round(available * 10) / 10);
|
||||
return `Based on ${shown} of ${requested} days`;
|
||||
}
|
||||
function KpiCard({ config, value, hint }) {
|
||||
return /* @__PURE__ */ React.createElement("div", { className: "rounded-[26px] border border-white/10 bg-white/[0.03] p-5 shadow-[0_18px_40px_rgba(2,6,23,0.18)]" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-3 text-slate-300" }, /* @__PURE__ */ React.createElement("div", { className: "flex h-11 w-11 items-center justify-center rounded-2xl bg-sky-300/10 text-sky-100" }, /* @__PURE__ */ React.createElement("i", { className: config.icon })), /* @__PURE__ */ React.createElement("span", { className: "text-[11px] font-semibold uppercase tracking-[0.18em] text-slate-500" }, config.label)), /* @__PURE__ */ React.createElement("p", { className: "mt-4 text-3xl font-semibold text-white tabular-nums" }, typeof value === "number" ? value.toLocaleString() : value), hint ? /* @__PURE__ */ React.createElement("p", { className: "mt-2 text-[11px] leading-4 text-slate-500" }, hint) : null);
|
||||
}
|
||||
function QuickCreateCard({ item }) {
|
||||
return /* @__PURE__ */ React.createElement(
|
||||
@@ -106032,7 +106045,15 @@ function StudioDashboard() {
|
||||
const kpis = overview.kpis || {};
|
||||
const widgetVisibility = overview.preferences?.widget_visibility || {};
|
||||
const showWidget = (key) => widgetVisibility[key] !== false;
|
||||
return /* @__PURE__ */ React.createElement(StudioLayout, { title: "Overview", subtitle: "Create, manage, and grow across artworks, cards, collections, and stories from one shared creator operating surface." }, /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-2 gap-4 lg:grid-cols-5" }, kpiConfig.map((config) => /* @__PURE__ */ React.createElement(KpiCard, { key: config.key, config, value: kpis?.[config.key] ?? 0 }))), /* @__PURE__ */ React.createElement("div", { className: "mt-6 grid gap-6 xl:grid-cols-[minmax(0,1fr)_360px]" }, /* @__PURE__ */ React.createElement("section", { className: "rounded-[30px] border border-white/10 bg-[radial-gradient(circle_at_top_left,_rgba(56,189,248,0.14),_transparent_35%),linear-gradient(135deg,_rgba(15,23,42,0.86),_rgba(2,6,23,0.96))] p-6" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React.createElement("h2", { className: "text-lg font-semibold text-white" }, "Command center"), /* @__PURE__ */ React.createElement("a", { href: "/studio/calendar", className: "text-sm font-medium text-sky-100" }, "Open calendar")), /* @__PURE__ */ React.createElement("div", { className: "mt-5 grid gap-5 lg:grid-cols-3" }, /* @__PURE__ */ React.createElement(
|
||||
return /* @__PURE__ */ React.createElement(StudioLayout, { title: "Overview", subtitle: "Create, manage, and grow across artworks, cards, collections, and stories from one shared creator operating surface." }, /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-2 gap-4 lg:grid-cols-5" }, kpiConfig.map((config) => /* @__PURE__ */ React.createElement(
|
||||
KpiCard,
|
||||
{
|
||||
key: config.key,
|
||||
config,
|
||||
value: kpis?.[config.key] ?? 0,
|
||||
hint: snapshotHint(config, kpis?.snapshot_window)
|
||||
}
|
||||
))), /* @__PURE__ */ React.createElement("div", { className: "mt-6 grid gap-6 xl:grid-cols-[minmax(0,1fr)_360px]" }, /* @__PURE__ */ React.createElement("section", { className: "rounded-[30px] border border-white/10 bg-[radial-gradient(circle_at_top_left,_rgba(56,189,248,0.14),_transparent_35%),linear-gradient(135deg,_rgba(15,23,42,0.86),_rgba(2,6,23,0.96))] p-6" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React.createElement("h2", { className: "text-lg font-semibold text-white" }, "Command center"), /* @__PURE__ */ React.createElement("a", { href: "/studio/calendar", className: "text-sm font-medium text-sky-100" }, "Open calendar")), /* @__PURE__ */ React.createElement("div", { className: "mt-5 grid gap-5 lg:grid-cols-3" }, /* @__PURE__ */ React.createElement(
|
||||
CommandCenterColumn,
|
||||
{
|
||||
title: "Publishing today",
|
||||
|
||||
Reference in New Issue
Block a user