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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 0 additions & 4 deletions .github/ci-suites.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
"group": "organization-search",
"task": "ci:e2e-organization-search"
},
{
"group": "org-redesign",
"task": "ci:e2e-org-redesign"
},
{
"group": "browser-extension-navigation",
"task": "ci:e2e-browser-extension"
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/ci-plan.gql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ query($base: String!, $head: String!) {
affectedTasks(base: $base, head: $head, tasks: [
"test", "build", "type-check", "ci:integration", "ci:desktop-live",
"ci:e2e-scim", "ci:e2e-cli", "ci:e2e-stop-after", "ci:e2e-desktop-inbox",
"ci:e2e-assistant-actions", "ci:e2e-organization-search", "ci:e2e-org-redesign",
"ci:e2e-assistant-actions", "ci:e2e-organization-search",
"ci:e2e-docs-platform",
"ci:e2e-browser-extension", "ci:e2e-project-files", "ci:e2e-mobile", "ci:e2e-seo"
]) {
Expand Down
69 changes: 2 additions & 67 deletions .github/scripts/http-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# CI groups, which reuse the production build from `e2e-build`.
# The job extracts it into apps/sim/.next before running these suites.
#
# Usage: http-e2e.sh <scim|cli|stop-after|desktop-inbox|assistant-actions|organization-search|org-redesign|browser-extension|browser-extension-native|browser-extension-navigation|browser-extension-composer|browser-extension-access|project-files|mobile|seo> (run from apps/sim)
# Usage: http-e2e.sh <scim|cli|stop-after|desktop-inbox|assistant-actions|organization-search|browser-extension|browser-extension-native|browser-extension-navigation|browser-extension-composer|browser-extension-access|project-files|mobile|seo> (run from apps/sim)
#
# The job provides DATABASE_URL, BETTER_AUTH_SECRET and ENCRYPTION_KEY; each group sets the rest of
# its app's environment here. Reports and server logs land in $RUNNER_TEMP/e2e.
Expand All @@ -20,7 +20,7 @@
# telemetry flush runs detached and still writes .next/dev).
set -euo pipefail

group=${1:?usage: http-e2e.sh <scim|cli|stop-after|desktop-inbox|assistant-actions|organization-search|org-redesign|browser-extension|browser-extension-native|browser-extension-navigation|browser-extension-composer|browser-extension-access|project-files|mobile|seo>}
group=${1:?usage: http-e2e.sh <scim|cli|stop-after|desktop-inbox|assistant-actions|organization-search|browser-extension|browser-extension-native|browser-extension-navigation|browser-extension-composer|browser-extension-access|project-files|mobile|seo>}
report_dir="$RUNNER_TEMP/e2e"
ready_timeout_seconds=600
mkdir -p "$report_dir"
Expand All @@ -32,7 +32,6 @@ status_log=''
realtime_pid=''
realtime_tag=''
realtime_log=''
agent_pid=''
browsers_pid=''
local_app_url=''
# `dev` or `start`; a group sets it before start_app.
Expand Down Expand Up @@ -64,10 +63,6 @@ finish() {
tail -n 100 "$realtime_log"
fi
fi
if [ -n "$agent_pid" ]; then
kill "$agent_pid" 2>/dev/null || true
wait "$agent_pid" 2>/dev/null || true
fi
if [ -n "$browsers_pid" ]; then
kill -- "-$browsers_pid" 2>/dev/null || true
wait "$browsers_pid" 2>/dev/null || true
Expand Down Expand Up @@ -138,13 +133,6 @@ start_realtime() {
wait_ready "$realtime_pid" "http://127.0.0.1:$port/health" "$name realtime server"
}

# stop_app: stops the app start_app started, so a group can start it again under other flags.
stop_app() {
bash "$GITHUB_WORKSPACE/.github/scripts/stop-session.sh" "$server_pid" "$app_tag"
wait "$server_pid" 2>/dev/null || true
server_pid=''
}

# wait_ready <pid> <health-url> <label>
wait_ready() {
local pid=$1 url=$2 label=$3
Expand Down Expand Up @@ -280,59 +268,6 @@ case "$group" in
esac
;;

# One hosted Enterprise organization, a scripted worker in place of the
# model, and the app twice: with People off, then on. Hosted is decided by the
# app's hostname, which the job maps to loopback. Both phases report, whichever fails.
org-redesign)
app_server=start
export REDIS_URL=redis://127.0.0.1:6379
export E2E_APP_PUBLIC_URL=http://org-redesign.sim.ai:3029
export NEXT_PUBLIC_APP_URL="$E2E_APP_PUBLIC_URL"
export INTERNAL_API_BASE_URL=http://127.0.0.1:3029 TRUSTED_ORIGINS=http://127.0.0.1:3029
export NEXT_PUBLIC_SOCKET_URL=http://127.0.0.1:3030 SOCKET_SERVER_URL=http://127.0.0.1:3030
export BILLING_ENABLED=true NEXT_PUBLIC_BILLING_ENABLED=true
export ENTERPRISE_ENABLED=true NEXT_PUBLIC_ENTERPRISE_ENABLED=true
export ORGANIZATIONS_ENABLED=true NEXT_PUBLIC_ORGANIZATIONS_ENABLED=true
export SSO_ENABLED=true NEXT_PUBLIC_SSO_ENABLED=true
export KNOWLEDGE_MEMBER_ACCESS=true CREDENTIAL_GROUPS=true ACCESS_CONTROL_ENABLED=true
export NEXT_PUBLIC_ACCESS_CONTROL_ENABLED=true SIM_LINKS=true
export COPILOT_TOOL_PERMISSIONS_ENABLED=true
export INTERNAL_API_SECRET=org-redesign-ci-local-secret-at-least-32-characters
export COPILOT_API_KEY=org-redesign-ci-local-copilot-key MOTHERSHIP_SIM_TRANSPORT=direct
export SIM_AGENT_API_URL=http://127.0.0.1:3031
export GOOGLE_CLIENT_ID=org-redesign-google-client GOOGLE_CLIENT_SECRET=org-redesign-google-secret
export JIRA_CLIENT_ID=org-redesign-jira-client JIRA_CLIENT_SECRET=org-redesign-jira-secret
export CONFLUENCE_CLIENT_ID=org-redesign-confluence-client CONFLUENCE_CLIENT_SECRET=org-redesign-confluence-secret
export STRIPE_SECRET_KEY=sk_test_org_redesign STRIPE_WEBHOOK_SECRET=whsec_org_redesign
export DB_TX_TRIPWIRE=throw
export BROWSER_EXTENSION_IDS=abcdefghijklmnopabcdefghijklmnop
bun --no-env-file scripts/org-redesign-seed.ts
start_browser_install org-redesign --only-shell chromium
bun --no-env-file scripts/org-redesign-e2e/scripted-agent.ts 3031 \
> "$report_dir/org-redesign-agent.log" 2>&1 &
agent_pid=$!
wait_ready "$agent_pid" http://127.0.0.1:3031/health 'scripted agent'
start_app org-redesign 3029 'organization redesign' record-http-status
start_realtime org-redesign 3030
wait_for_browsers
run_status=0
ORG_REDESIGN_E2E_ORIGIN="$E2E_APP_PUBLIC_URL" \
ORG_REDESIGN_E2E_DATABASE_URL="$DATABASE_URL" \
ORG_REDESIGN_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \
ORG_REDESIGN_E2E_REPORT_PATH="$report_dir/org-redesign-ui-report.json" \
bun --no-env-file scripts/test-org-redesign-e2e.ts || run_status=$?
stop_app
export PEOPLE=true
start_app org-redesign-people 3029 'organization redesign, People on'
ORG_REDESIGN_E2E_PHASE=people \
ORG_REDESIGN_E2E_ORIGIN="$E2E_APP_PUBLIC_URL" \
ORG_REDESIGN_E2E_DATABASE_URL="$DATABASE_URL" \
ORG_REDESIGN_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \
ORG_REDESIGN_E2E_REPORT_PATH="$report_dir/org-redesign-people-ui-report.json" \
bun --no-env-file scripts/test-org-redesign-e2e.ts || run_status=$?
exit "$run_status"
;;

browser-extension|browser-extension-native|browser-extension-navigation|browser-extension-composer|browser-extension-access)
extension_group=all
case "$group" in
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ jobs:
needs: [changes, e2e-build]
if: needs.changes.outputs.http == 'true'
runs-on: ubuntu-24.04
timeout-minutes: ${{ matrix.group == 'org-redesign' && 45 || 20 }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.changes.outputs.http_matrix) }}
Expand All @@ -227,7 +227,7 @@ jobs:
--health-retries 10
# Desktop inbox, browser extension, and Project Files use Redis.
redis:
image: ${{ (matrix.group == 'desktop-inbox' || matrix.group == 'assistant-actions' || matrix.group == 'organization-search' || matrix.group == 'org-redesign' || startsWith(matrix.group, 'browser-extension-') || matrix.group == 'project-files') && 'redis:8.2-alpine' || '' }}
image: ${{ (matrix.group == 'desktop-inbox' || matrix.group == 'assistant-actions' || matrix.group == 'organization-search' || startsWith(matrix.group, 'browser-extension-') || matrix.group == 'project-files') && 'redis:8.2-alpine' || '' }}
ports:
- 6379:6379
options: >-
Expand Down Expand Up @@ -293,10 +293,6 @@ jobs:
if: matrix.group == 'scim'
run: printf '127.0.0.1 scim-e2e.sim.ai\n' | sudo tee -a /etc/hosts

- name: Map the hosted organization fixture to loopback
if: matrix.group == 'org-redesign'
run: printf '127.0.0.1 org-redesign.sim.ai\n' | sudo tee -a /etc/hosts

# No step timeout: the job's bound covers a hang without cutting a slow but healthy suite
# short of writing its report.
- name: Run end-to-end suites
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/app/_shell/providers/get-query-client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { isServer, QueryClient } from '@tanstack/react-query'
import { isDesktopApp } from '@/lib/desktop'

export function makeQueryClient() {
function makeQueryClient() {
return new QueryClient({
defaultOptions: {
queries: {
Expand Down
25 changes: 0 additions & 25 deletions apps/sim/app/api/organizations/[id]/home/calendar/route.ts

This file was deleted.

25 changes: 0 additions & 25 deletions apps/sim/app/api/organizations/[id]/home/email/route.ts

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions apps/sim/app/api/organizations/[id]/sim-links/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
internalRateLimits,
internalSessionAuth,
} from '@/lib/api/server/routes'
import { presentSimLink, presentSimLinkPage } from '@/lib/api/server/sim-link-presenters'
import { presentSimLink } from '@/lib/api/server/sim-link-presenters'
import { createSimLink, listSimLinks } from '@/lib/sim-links/application/use-cases'

const policy = {
Expand All @@ -21,7 +21,7 @@ export const GET = defineInternalJsonRoute({
operation: listSimLinks.operation,
useCase: listSimLinks,
mapInput: ({ params, query }) => ({ organizationId: params.id, ...query }),
present: presentSimLinkPage,
present: ({ links, nextCursor }) => ({ links: links.map(presentSimLink), nextCursor }),
})

export const POST = defineInternalJsonRoute({
Expand Down
15 changes: 0 additions & 15 deletions apps/sim/app/o/[organizationId]/_redesign/hydrated.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions apps/sim/app/o/[organizationId]/_redesign/redesign-host.tsx

This file was deleted.

13 changes: 5 additions & 8 deletions apps/sim/app/o/[organizationId]/chat/[chatId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ import { organizationRoutes, WORKSPACE_SETTINGS_PATH } from '@/lib/navigation/pa
import { getOrganizationSurfaceContext } from '@/lib/organizations/surface'
import OrganizationChatLoading from '@/app/o/[organizationId]/chat/[chatId]/loading'
import { OrganizationConversation } from '@/app/o/[organizationId]/components/organization-conversation'
import {
canUseOrganizationChat,
getOrganizationBuildRedirect,
} from '@/app/o/[organizationId]/home/home-redirect'
import { getOrganizationHomeRedirect } from '@/app/o/[organizationId]/home/home-redirect'

export const metadata: Metadata = { title: 'Chat' }

Expand All @@ -24,8 +21,8 @@ export default async function OrganizationChatPage({
if (!session?.user?.id) notFound()
const context = await getOrganizationSurfaceContext(organizationId, session.user.id)
if (!context) notFound()
if (!canUseOrganizationChat(context)) {
const unavailableRedirect = getOrganizationBuildRedirect(context, organizationId)
if (!context.mothershipAvailable || (!context.canBuild && !context.searchAccess.memberScoped)) {
const unavailableRedirect = getOrganizationHomeRedirect(context, organizationId)
if (unavailableRedirect) redirect(unavailableRedirect)
}
const chat = await getAccessibleCopilotChatAuth(chatId, session.user.id, {
Expand All @@ -36,8 +33,8 @@ export default async function OrganizationChatPage({
if (!context.searchAccess.memberScoped) redirect(WORKSPACE_SETTINGS_PATH)
redirect(organizationRoutes(organizationId).searchChat(chatId))
}
const buildRedirect = getOrganizationBuildRedirect(context, organizationId)
if (buildRedirect) redirect(buildRedirect)
const homeRedirect = getOrganizationHomeRedirect(context, organizationId)
if (homeRedirect) redirect(homeRedirect)

return (
<Suspense fallback={<OrganizationChatLoading />}>
Expand Down
Loading
Loading