Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# open: if the diff cannot be resolved, everything runs.
changes:
name: Changes
runs-on: blacksmith-2vcpu-ubuntu-2404
runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
timeout-minutes: 5
outputs:
typecheck: ${{ steps.detect.outputs.typecheck }}
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
contents: read
id-token: write
name: Lint
runs-on: blacksmith-8vcpu-ubuntu-2404
runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
timeout-minutes: 10
steps:
- name: Checkout
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
name: Build and Typecheck
needs: changes
if: ${{ !cancelled() && (needs.changes.outputs.build != 'false' || needs.changes.outputs.typecheck != 'false') }}
runs-on: blacksmith-8vcpu-ubuntu-2404
runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
timeout-minutes: 10
steps:
- name: Checkout
Expand All @@ -142,8 +142,11 @@ jobs:
run: |
# Fetch only the indexes these main and universe packages need. The full set is ~42 MB,
# which a slow mirror can stretch past the wait below.
sudo sed -i -e 's|http://|https://|g' -e 's/^Components: .*/Components: main universe/' \
/etc/apt/blacksmith-ubuntu-mirrors.txt /etc/apt/sources.list.d/ubuntu.sources
for sources in /etc/apt/blacksmith-ubuntu-mirrors.txt /etc/apt/sources.list.d/ubuntu.sources; do
if [ -f "$sources" ]; then
sudo sed -i -e 's|http://|https://|g' -e 's/^Components: .*/Components: main universe/' "$sources"
fi
done
(
set +e
sudo apt-get update -o Acquire::Languages=none \
Expand Down Expand Up @@ -275,7 +278,7 @@ jobs:
name: Test
needs: changes
if: ${{ !cancelled() && needs.changes.outputs.test != 'false' }}
runs-on: blacksmith-8vcpu-ubuntu-2404
runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
timeout-minutes: 10
steps:
- name: Checkout
Expand All @@ -295,8 +298,11 @@ jobs:
run: |
# Fetch only the indexes these main and universe packages need. The full set is ~42 MB,
# which a slow mirror can stretch past the wait below.
sudo sed -i -e 's|http://|https://|g' -e 's/^Components: .*/Components: main universe/' \
/etc/apt/blacksmith-ubuntu-mirrors.txt /etc/apt/sources.list.d/ubuntu.sources
for sources in /etc/apt/blacksmith-ubuntu-mirrors.txt /etc/apt/sources.list.d/ubuntu.sources; do
if [ -f "$sources" ]; then
sudo sed -i -e 's|http://|https://|g' -e 's/^Components: .*/Components: main universe/' "$sources"
fi
done
(
set +e
sudo apt-get update -o Acquire::Languages=none \
Expand Down Expand Up @@ -365,7 +371,7 @@ jobs:
name: Test Web ${{ matrix.shard }}
needs: changes
if: ${{ !cancelled() && needs.changes.outputs.test_web != 'false' }}
runs-on: blacksmith-8vcpu-ubuntu-2404
runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
timeout-minutes: 10
strategy:
fail-fast: false
Expand Down Expand Up @@ -427,7 +433,7 @@ jobs:
contents: read
id-token: write
name: Test Server ${{ matrix.shard }}
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
# Shards take 2-5 minutes. When the shared task cache throttles reads, each
# failed fetch stalls vp for 15-90s, which pushed shards past 10 minutes.
timeout-minutes: 20
Expand Down Expand Up @@ -557,7 +563,7 @@ jobs:
name: Rust
needs: changes
if: ${{ !cancelled() && needs.changes.outputs.rust != 'false' }}
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
timeout-minutes: 10
steps:
- name: Checkout
Expand Down Expand Up @@ -591,7 +597,7 @@ jobs:
name: Mobile Native Static Analysis
needs: changes
if: ${{ !cancelled() && needs.changes.outputs.mobile_native != 'false' }}
runs-on: blacksmith-6vcpu-macos-27
runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-6vcpu-macos-27' || 'macos-26' }}
timeout-minutes: 10
steps:
- name: Checkout
Expand Down Expand Up @@ -624,7 +630,7 @@ jobs:
name: Release Smoke
needs: changes
if: ${{ !cancelled() && needs.changes.outputs.release_smoke != 'false' }}
runs-on: blacksmith-8vcpu-ubuntu-2404
runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
timeout-minutes: 15
steps:
- name: Checkout
Expand Down Expand Up @@ -664,7 +670,7 @@ jobs:
mobile_native_static_analysis,
release_smoke,
]
runs-on: blacksmith-2vcpu-ubuntu-2404
runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
timeout-minutes: 5
steps:
- name: Require every job to pass
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mobile-fingerprint-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ concurrency:
jobs:
fingerprint:
name: Native fingerprint diff
runs-on: blacksmith-8vcpu-ubuntu-2404
runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
permissions:
contents: read
env:
Expand Down
16 changes: 16 additions & 0 deletions apps/web/src/components/chat/ChatComposer.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { parseDeliveryPullRequestUrl } from "~/lib/deliveryPullRequest";
import { VoiceInputSetup } from "./VoiceInputSetup";
import { useComposerTypingGuard } from "./useComposerTypingGuard";
import { insertAttachmentReferencesForDraft } from "./composerAttachmentReferences";
Expand Down Expand Up @@ -3576,6 +3577,21 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)

{composerAttachmentFileList}

{pendingUserInputs.length === 0 &&
!isComposerApprovalState &&
prompt.trim().startsWith("https://github.com/") &&
parseDeliveryPullRequestUrl(prompt) && (
<button
className="mx-2 rounded-md border px-3 py-1 text-sm"
type="button"
onClick={() =>
void navigate({ to: "/delivery", search: { pr: prompt.trim() } })
}
>
Open Delivery
</button>
)}

<div className="relative">
{previewFile ? (
<ComposerFilePreviewDialog
Expand Down
8 changes: 8 additions & 0 deletions apps/web/src/components/sidebar/SidebarChrome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,14 @@ const SidebarUtilityMenu = memo(function SidebarUtilityMenu() {
onClick={handlePullRequestsClick}
/>
) : null}
<SidebarUtilityItem
icon={<PullRequestGlyph.pullRequest />}
label="Delivery"
onClick={() => {
closeMobileSidebar();
void navigate({ to: "/delivery", search: { ticket: undefined } });
}}
/>
<SidebarUtilityItem
icon={<ChartNoAxesColumnIcon />}
label="Usage"
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/components/sidebar/mainAppLocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ export function isAppModalPage(pathname: string) {
}

export function isSidebarUtilityPage(pathname: string) {
return pathname.startsWith("/projects/") || pathname === "/pull-requests";
return (
pathname.startsWith("/projects/") || pathname === "/pull-requests" || pathname === "/delivery"
);
}

// Pages the root route always renders without the app shell, so they are never
Expand Down
11 changes: 11 additions & 0 deletions apps/web/src/lib/deliveryPullRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { sourceControlClients } from "@t3tools/client-runtime/source-control-clients";

export function parseDeliveryPullRequestUrl(value: string) {
try {
const url = new URL(value.trim());
if (url.origin !== "https://github.com" || url.username || url.password) return null;
return sourceControlClients.parseChangeRequestUrl(url.href)?.link ?? null;
} catch {
return null;
}
}
21 changes: 21 additions & 0 deletions apps/web/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { Route as ChatUsageRouteImport } from './routes/_chat.usage'
import { Route as ChatSettingsRouteImport } from './routes/_chat.settings'
import { Route as ChatPullRequestsRouteImport } from './routes/_chat.pull-requests'
import { Route as ChatNewRouteImport } from './routes/_chat.new'
import { Route as ChatDeliveryRouteImport } from './routes/_chat.delivery'
import { Route as ThreadsEnvironmentIdThreadIdRouteImport } from './routes/threads.$environmentId.$threadId'
import { Route as ChatSettingsWorktreesRouteImport } from './routes/_chat.settings.worktrees'
import { Route as ChatSettingsVoiceRouteImport } from './routes/_chat.settings.voice'
Expand Down Expand Up @@ -117,6 +118,11 @@ const ChatNewRoute = ChatNewRouteImport.update({
path: '/new',
getParentRoute: () => ChatRoute,
} as any)
const ChatDeliveryRoute = ChatDeliveryRouteImport.update({
id: '/delivery',
path: '/delivery',
getParentRoute: () => ChatRoute,
} as any)
const ThreadsEnvironmentIdThreadIdRoute =
ThreadsEnvironmentIdThreadIdRouteImport.update({
id: '/threads/$environmentId/$threadId',
Expand Down Expand Up @@ -282,6 +288,7 @@ export interface FileRoutesByFullPath {
'/guest': typeof GuestRoute
'/pair': typeof PairRoute
'/welcome': typeof WelcomeRoute
'/delivery': typeof ChatDeliveryRoute
'/new': typeof ChatNewRoute
'/pull-requests': typeof ChatPullRequestsRoute
'/settings': typeof ChatSettingsRouteWithChildren
Expand Down Expand Up @@ -325,6 +332,7 @@ export interface FileRoutesByTo {
'/guest': typeof GuestRoute
'/pair': typeof PairRoute
'/welcome': typeof WelcomeRoute
'/delivery': typeof ChatDeliveryRoute
'/new': typeof ChatNewRoute
'/pull-requests': typeof ChatPullRequestsRoute
'/settings': typeof ChatSettingsRouteWithChildren
Expand Down Expand Up @@ -371,6 +379,7 @@ export interface FileRoutesById {
'/guest': typeof GuestRoute
'/pair': typeof PairRoute
'/welcome': typeof WelcomeRoute
'/_chat/delivery': typeof ChatDeliveryRoute
'/_chat/new': typeof ChatNewRoute
'/_chat/pull-requests': typeof ChatPullRequestsRoute
'/_chat/settings': typeof ChatSettingsRouteWithChildren
Expand Down Expand Up @@ -418,6 +427,7 @@ export interface FileRouteTypes {
| '/guest'
| '/pair'
| '/welcome'
| '/delivery'
| '/new'
| '/pull-requests'
| '/settings'
Expand Down Expand Up @@ -461,6 +471,7 @@ export interface FileRouteTypes {
| '/guest'
| '/pair'
| '/welcome'
| '/delivery'
| '/new'
| '/pull-requests'
| '/settings'
Expand Down Expand Up @@ -506,6 +517,7 @@ export interface FileRouteTypes {
| '/guest'
| '/pair'
| '/welcome'
| '/_chat/delivery'
| '/_chat/new'
| '/_chat/pull-requests'
| '/_chat/settings'
Expand Down Expand Up @@ -649,6 +661,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ChatNewRouteImport
parentRoute: typeof ChatRoute
}
'/_chat/delivery': {
id: '/_chat/delivery'
path: '/delivery'
fullPath: '/delivery'
preLoaderRoute: typeof ChatDeliveryRouteImport
parentRoute: typeof ChatRoute
}
'/threads/$environmentId/$threadId': {
id: '/threads/$environmentId/$threadId'
path: '/threads/$environmentId/$threadId'
Expand Down Expand Up @@ -927,6 +946,7 @@ const ChatSettingsRouteWithChildren = ChatSettingsRoute._addFileChildren(
)

interface ChatRouteChildren {
ChatDeliveryRoute: typeof ChatDeliveryRoute
ChatNewRoute: typeof ChatNewRoute
ChatPullRequestsRoute: typeof ChatPullRequestsRoute
ChatSettingsRoute: typeof ChatSettingsRouteWithChildren
Expand All @@ -937,6 +957,7 @@ interface ChatRouteChildren {
}

const ChatRouteChildren: ChatRouteChildren = {
ChatDeliveryRoute: ChatDeliveryRoute,
ChatNewRoute: ChatNewRoute,
ChatPullRequestsRoute: ChatPullRequestsRoute,
ChatSettingsRoute: ChatSettingsRouteWithChildren,
Expand Down
Loading
Loading