feat(deploy-modal): logs section + URL-driven log selection#4522
feat(deploy-modal): logs section + URL-driven log selection#4522stylessh wants to merge 56 commits intosimstudioai:stagingfrom
Conversation
…ership workflow edits via sockets, ui improvements
…ng improvements, posthog, secrets mutations
…ration, signup method feature flags, SSO improvements
* feat(posthog): Add tracking on mothership abort (simstudioai#4023) Co-authored-by: Theodore Li <theo@sim.ai> * fix(login): fix captcha headers for manual login (simstudioai#4025) * fix(signup): fix turnstile key loading * fix(login): fix captcha header passing * Catch user already exists, remove login form captcha
…nts, secrets performance, polling refactors, drag resources in mothership
…y invalidation, HITL docs
…endar triggers, docs updates, integrations/models pages improvements
…ions, jira forms endpoints
…mat, logs performance improvements fix(csp): add missing analytics domains, remove unsafe-eval, fix workspace CSP gap (simstudioai#4179) fix(landing): return 404 for invalid dynamic route slugs (simstudioai#4182) improvement(seo): optimize sitemaps, robots.txt, and core web vitals across sim and docs (simstudioai#4170) fix(gemini): support structured output with tools on Gemini 3 models (simstudioai#4184) feat(brightdata): add Bright Data integration with 8 tools (simstudioai#4183) fix(mothership): fix superagent credentials (simstudioai#4185) fix(logs): close sidebar when selected log disappears from filtered list; cleanup (simstudioai#4186)
v0.6.46: mothership streaming fixes, brightdata integration
…m integration, atlassian triggers
…ze, subagent thinking, files sorting, agentphone integration
fix(db): revert statement_timeout startup options breaking pooled connections (simstudioai#4284)
v0.6.57: mothership reliability, ashby refactor, tables row count, copilot id fix, bun upgrade
…rizations, mothership positional table row insertion, CI improvements, org-external users, file viewer improvements
v0.6.62: fix new copilot chat creation and selection on refresh
…ixes, db query optimizations, contract boundaries code hygiene, CORS, toast improvements, tables infinite query, executor robustness, reranker support
…tion blocks/connectors updates
…ogs block, parallel-in-loop wall clock, gpt-image-2
…s, logs panel width, tables UI/DB decoupling v0.6.67: VFS upload fix, posthog/copilot correlation, exa date filters, logs panel width, tables UI/DB decoupling
…ering upgrades, data drains, security hardening, paginated dropdowns
…ntegrations, robots.txt update, workday hardening
v0.6.72: billing pool contention fix
- New "Logs" section in deploy modal General tab showing latest 5 runs; clicking a row deep-links to /logs?executionId=<id>. - Adopt nuqs for URL state and make `executionId` the source of truth for the open log detail panel (auto-opens on deep link, persists on selection, clears on close, survives back/forward). - Filter store's syncWithURL now preserves unrelated query params instead of wiping the entire query string. - Declare @radix-ui/react-dismissable-layer and @opentelemetry/core as direct deps (were resolving via hoisted transitive deps).
|
@stylessh is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
PR SummaryMedium Risk Overview Refactors the Logs page so Centralizes log status/trigger badge logic into a new shared Reviewed by Cursor Bugbot for commit 9cce6fd. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 29606901 | Triggered | Generic High Entropy Secret | a54dcbe | apps/sim/providers/utils.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Greptile SummaryAdds a Logs section to the workflow deploy modal showing the latest 5 runs, and refactors the
Confidence Score: 4/5Safe to merge; the new Logs panel and URL-driven selection work correctly in the happy path with two minor edge cases worth addressing. The
Important Files Changed
Sequence DiagramsequenceDiagram
participant Modal as Deploy Modal (Logs)
participant Router as Next.js Router
participant LogsPage as /logs Page
participant nuqs as nuqs (useQueryState)
participant FilterStore as Filter Store
Modal->>Router: "router.push(/logs?executionId=X)"
Router->>LogsPage: "mount with ?executionId=X"
nuqs-->>LogsPage: "executionIdParam = X"
LogsPage->>LogsPage: deepLinkQuery fetches by executionId
LogsPage->>LogsPage: dispatch(TOGGLE_LOG, resolvedId)
Note over LogsPage,nuqs: User clicks a different row
LogsPage->>nuqs: setExecutionIdParam(log.executionId)
nuqs-->>Router: "replaceState ?executionId=Y"
LogsPage->>LogsPage: dispatch(TOGGLE_LOG, rowId)
Note over LogsPage,FilterStore: User changes a filter
FilterStore->>FilterStore: syncWithURL()
FilterStore->>FilterStore: "getSearchParams() reads ?executionId=Y"
FilterStore->>FilterStore: delete only FILTER_PARAM_KEYS
FilterStore->>FilterStore: "replaceState ?executionId=Y&level=error"
Note over LogsPage,nuqs: User closes sidebar
LogsPage->>nuqs: setExecutionIdParam(null)
nuqs-->>Router: replaceState (executionId removed)
Reviews (1): Last reviewed commit: "feat(deploy-modal): add logs section + U..." | Re-trigger Greptile |
| import { | ||
| getDisplayStatus, | ||
| StatusBadge, | ||
| TriggerBadge, | ||
| } from '@/app/workspace/[workspaceId]/logs/utils' |
There was a problem hiding this comment.
Cross-feature import of presentation components
StatusBadge, TriggerBadge, and getDisplayStatus are defined inside the logs feature's own utils file (@/app/workspace/[workspaceId]/logs/utils) and are now imported by a completely different feature (the deploy modal). Per the project's architecture guidelines, utilities consumed by two or more distinct features belong in @/lib/ or a shared @/components path rather than inside a feature-scoped directory. As the logs feature grows, any refactor or rename of these utilities will silently break the deploy modal.
Context Used: Core architecture principles for the Sim app (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| </div> | ||
| </div> | ||
| <div className='bg-[var(--surface-2)]'> | ||
| {[0, 1, 2].map((i) => ( |
There was a problem hiding this comment.
Skeleton renders 3 placeholder rows, but
LOGS_LIMIT is 5. When the actual data loads with 4–5 rows the container jumps in height, producing a visible layout shift. The skeleton count should match LOGS_LIMIT.
| {[0, 1, 2].map((i) => ( | |
| {Array.from({ length: LOGS_LIMIT }, (_, i) => i).map((i) => ( |
| const resolvedId = deepLinkQuery.data?.id | ||
| if (resolvedId) { | ||
| if (resolvedId && resolvedId !== selectedLogIdRef.current) { | ||
| dispatch({ type: 'TOGGLE_LOG', logId: resolvedId }) |
There was a problem hiding this comment.
Deep-link won't reopen sidebar for same execution ID after manual close
The guard resolvedId !== selectedLogIdRef.current prevents dispatching TOGGLE_LOG when the IDs match. Because selectedLogIdRef retains the last-selected log id even after handleCloseSidebar (which only changes isSidebarOpen, not the selected id), navigating back to /logs?executionId=<X> after manually closing the panel for log X will leave the sidebar closed — the effect sees resolvedId === selectedLogIdRef.current and silently no-ops. The guard is necessary to avoid double-opening on data refetch, but it needs an additional check: if the sidebar is currently closed it should still open.
Address PR feedback: - Move LogStatus, getDisplayStatus, STATUS_CONFIG, StatusBadge, and TriggerBadge from feature-scoped logs/utils.ts to @/lib/logs/status so cross-feature consumers (deploy modal) don't reach into another feature's directory. Update all four consumers accordingly. - Match deploy-modal Logs skeleton row count to LOGS_LIMIT to avoid layout shift when data loads. - Allow deep-link bridge to reopen the sidebar when navigating back to the same executionId after a manual close (previously the same-id guard silently no-op'd). - Fix biome organizeImports error caught by CI lint:check.
Summary
Adds a Logs section below Versions in the workflow deploy modal showing the latest 5 runs (status, trigger, duration, timestamp). Clicking a row deep-links to
/logs?executionId=<id>and auto-opens the detail panel.To make that link survive — and to make log selection in general bookmarkable / back-button-friendly — adopted
nuqsand refactored the logs page so?executionId=<id>is the source of truth for the open detail panel. Also fixed the filter store'ssyncWithURLwhich was wiping unrelated query params (it now only deletes/sets keys it owns), and declared@radix-ui/react-dismissable-layerand@opentelemetry/coreas direct deps (they were resolving through hoisted transitives and broke the Turbopack build).Type of Change
Testing
/logs?executionId=..., URL persists, detail panel opens./logs, click any row → URL updates; close panel → URL clears; back/forward navigates selection state. Apply filters and confirmexecutionIdis no longer wiped from the URL.Checklist