Skip to content

Commit c22a5cb

Browse files
authored
Merge branch 'main' into hyc/orch/multi-agent
2 parents 90066c6 + a9e4b38 commit c22a5cb

6 files changed

Lines changed: 11 additions & 291 deletions

File tree

.env.example

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
# Copy to `.env` (or set via your shell) to enable optional integrations.
22
# `.env`, `.env.local`, and `.env.production` are all gitignored.
33
#
4-
# Both of these values are PUBLIC (they're shipped to the browser by Astro's
4+
# Values below are PUBLIC (they're shipped to the browser by Astro's
55
# `envField`, and live behind rate limiting / allow-lists on the vendor side).
66

77
# Kapa Custom Frontend integration ID for the "Ask AI" button in the header.
88
# If unset, the Ask AI button is hidden and the site still runs normally.
99
# Get yours at: https://app.kapa.ai/admin
1010
PUBLIC_KAPA_INTEGRATION_ID=
11-
12-
# PushFeedback project ID for the per-page "Was this helpful?" widget and the
13-
# feedback widget on the Scalar API page. If unset, both widgets are hidden.
14-
# Dashboard: https://app.pushfeedback.com
15-
PUBLIC_PUSHFEEDBACK_PROJECT_ID=

astro.config.mjs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ export default defineConfig({
2020
access: 'public',
2121
optional: true,
2222
}),
23-
PUBLIC_PUSHFEEDBACK_PROJECT_ID: envField.string({
24-
context: 'client',
25-
access: 'public',
26-
optional: true,
27-
}),
2823
PUBLIC_RUDDERSTACK_WRITE_KEY: envField.string({
2924
context: 'client',
3025
access: 'public',
@@ -82,12 +77,6 @@ export default defineConfig({
8277
// on every page on docs.warp.dev today; Starlight does not produce
8378
// them by default. Per-page OG/Twitter tags (image, branded title,
8479
// twitter:title/description) live in src/components/CustomHead.astro.
85-
//
86-
// PushFeedback CSS + JS used to live here, but they were render-
87-
// blocking on every page even though the widget itself only sits
88-
// at the bottom of the page in `FeedbackFooter.astro`. The lazy
89-
// loader now lives inside `FeedbackButtons.astro` and pulls the
90-
// assets in `requestIdleCallback` time — off the critical path.
9180
{
9281
tag: 'meta',
9382
attrs: { name: 'robots', content: 'index, follow' },

src/components/FeedbackButtons.astro

Lines changed: 0 additions & 162 deletions
This file was deleted.

src/components/FeedbackFooter.astro

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
---
2-
// Custom footer with PushFeedback "Was this helpful?" widget.
3-
// PushFeedback CDN is loaded via Starlight's `head` config in astro.config.mjs.
4-
// Dashboard: https://app.pushfeedback.com
2+
// Custom footer: drops EditLink + LastUpdated from Starlight's default
3+
// footer and keeps Pagination + the Starlight credits link.
54
import Pagination from 'virtual:starlight/components/Pagination';
65
import config from 'virtual:starlight/user-config';
7-
import FeedbackButtons from './FeedbackButtons.astro';
86
---
97

108
<footer class="sl-flex">
11-
<FeedbackButtons />
12-
139
<Pagination />
1410

1511
{
@@ -22,15 +18,11 @@ import FeedbackButtons from './FeedbackButtons.astro';
2218
</footer>
2319

2420
<style>
25-
/* `.feedback-*` rules live alongside the markup in FeedbackButtons.astro
26-
so they ship together. Only footer-level layout stays here. */
2721
@layer starlight.core {
2822
footer {
2923
flex-direction: column;
3024
gap: 1.25rem;
3125
margin-top: 2rem;
32-
padding-top: 1.25rem;
33-
border-top: 1px solid var(--sl-color-hairline-light);
3426
}
3527
.kudos {
3628
align-items: center;

src/pages/api.astro

Lines changed: 5 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,9 @@
1313
import fs from 'node:fs';
1414
import { parse } from 'yaml';
1515
import WarpTopbar from '../components/WarpTopbar.astro';
16-
import FeedbackButtons from '../components/FeedbackButtons.astro';
1716
const yamlContent = fs.readFileSync('developers/agent-api-openapi.yaml', 'utf-8');
1817
const specObject = parse(yamlContent);
1918
const specJson = JSON.stringify(specObject);
20-
// `PUBLIC_PUSHFEEDBACK_PROJECT_ID` is read directly inside `<FeedbackButtons />`
21-
// (see `src/components/FeedbackButtons.astro`) — no need to plumb it through
22-
// here.
2319
---
2420

2521
<!doctype html>
@@ -47,9 +43,6 @@ const specJson = JSON.stringify(specObject);
4743
<meta name="twitter:description" content="Interactive API reference for the Agent API. Create and manage cloud agent runs, schedules, and more." />
4844
<meta name="twitter:image" content="https://docs.warp.dev/assets/og/api.png" />
4945
<link rel="shortcut icon" href="/favicon.svg" type="image/svg+xml" />
50-
{/* PushFeedback CSS + JS are NOT loaded here — the lazy loader inside
51-
`<FeedbackButtons />` (rendered below) injects them on idle so the
52-
Scalar reference's first paint isn't blocked on a CDN fetch. */}
5346
<script is:inline>
5447
// Theme persistence: shared between Starlight pages and this Scalar
5548
// /api page. `localStorage['starlight-theme']` is the single source
@@ -58,7 +51,8 @@ const specJson = JSON.stringify(specObject);
5851
// `prefers-color-scheme` and apply both `body.dark-mode` /
5952
// `body.light-mode` (Scalar's color contract — our customCss block
6053
// below keys all the brand tokens off these classes) and
61-
// `<html data-theme>` (PushFeedback's contract).
54+
// `<html data-theme>` (which drives the first-paint canvas color
55+
// rules in the inline `<style>` block below).
6256
//
6357
// Runs synchronously in <head> so the body class is set before
6458
// Scalar's bundle parses, avoiding a flash from Scalar's default.
@@ -118,9 +112,9 @@ const specJson = JSON.stringify(specObject);
118112
apply(resolve(e.newValue));
119113
});
120114
// Belt-and-braces: any other actor that flips body.dark-mode /
121-
// body.light-mode (Scalar internals, PushFeedback, future
122-
// integrations) should still update html[data-theme] so
123-
// PushFeedback's modal stays in sync with the visible page.
115+
// body.light-mode (Scalar internals, future integrations) should
116+
// still update html[data-theme] so the first-paint canvas rules
117+
// stay in sync with the visible page.
124118
var mirror = new MutationObserver(function () {
125119
var b = document.body;
126120
if (!b) return;
@@ -352,93 +346,5 @@ const specJson = JSON.stringify(specObject);
352346
})();
353347
</script>
354348
<script is:inline src="https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.57.1" crossorigin="anonymous"></script>
355-
<FeedbackButtons
356-
question="Was this helpful?"
357-
class="api-feedback-widget"
358-
questionClass="api-feedback-label"
359-
buttonClass="api-feedback-btn"
360-
page="/api"
361-
/>
362-
<style is:inline>
363-
/* `.warp-topbar*` rules ship with `<WarpTopbar />` itself; only the
364-
/api-specific feedback widget styling lives here.
365-
366-
Anchored to the bottom-RIGHT so the widget sits where users naturally
367-
look for inline page actions. Scalar's Shell client picker / dark-mode
368-
toggle live inside the operations column rather than fixed to the
369-
viewport, so the two don't actually collide at this z-index.
370-
371-
Soft elevation (hairline + shadow) replaces the hard border so the
372-
card reads as a layer above the page rather than a flat patch.
373-
Light-mode swaps the shadow to a quieter alpha. */
374-
.api-feedback-widget {
375-
position: fixed;
376-
bottom: 1.25rem;
377-
right: 1.25rem;
378-
display: inline-flex;
379-
align-items: center;
380-
gap: 0.5rem;
381-
padding: 0.4375rem 0.625rem 0.4375rem 0.875rem;
382-
border-radius: 0.625rem;
383-
background: var(--scalar-background-2);
384-
border: 1px solid var(--scalar-border-color);
385-
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.12);
386-
z-index: 1000;
387-
font-family: var(--scalar-font, 'Inter', sans-serif);
388-
}
389-
.light-mode .api-feedback-widget {
390-
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
391-
}
392-
.api-feedback-label {
393-
color: var(--scalar-color-2);
394-
font-size: 0.8125rem;
395-
font-weight: 500;
396-
line-height: 1;
397-
}
398-
.api-feedback-btn {
399-
display: inline-flex;
400-
align-items: center;
401-
justify-content: center;
402-
gap: 0.3125rem;
403-
padding: 0.25rem 0.5rem;
404-
border: none;
405-
border-radius: 0.4375rem;
406-
background: transparent;
407-
color: var(--scalar-color-2);
408-
font-size: 0.75rem;
409-
font-weight: 500;
410-
font-family: var(--scalar-font, 'Inter', sans-serif);
411-
line-height: 1;
412-
cursor: pointer;
413-
transition: color 0.15s ease, background-color 0.15s ease;
414-
}
415-
.api-feedback-btn svg {
416-
width: 13px;
417-
height: 13px;
418-
opacity: 0.85;
419-
}
420-
.api-feedback-btn:hover {
421-
color: var(--scalar-color-1);
422-
background: var(--scalar-background-3);
423-
}
424-
.api-feedback-btn:hover svg {
425-
opacity: 1;
426-
}
427-
.api-feedback-btn:focus-visible {
428-
outline: 2px solid var(--scalar-color-accent);
429-
outline-offset: 1px;
430-
}
431-
@media (max-width: 640px) {
432-
.api-feedback-widget {
433-
bottom: 1rem;
434-
right: 1rem;
435-
padding: 0.375rem 0.5rem 0.375rem 0.75rem;
436-
gap: 0.375rem;
437-
}
438-
.api-feedback-label {
439-
font-size: 0.75rem;
440-
}
441-
}
442-
</style>
443349
</body>
444350
</html>

0 commit comments

Comments
 (0)