Feat(webapp) chat AI UI improvements, new task landing pages and side menu#3941
Feat(webapp) chat AI UI improvements, new task landing pages and side menu#3941samejr wants to merge 143 commits into
Conversation
Conflicts: - AgentMessageView.tsx, AgentView.tsx: kept both sides. - schedules/route.tsx: deletion preserved; the purchase modal and usage bar have been moved into the Scheduled Task landing page with a new shared resource action route. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Important Review skippedToo many files! This PR contains 156 files, which is 6 over the limit of 150. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (156)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| {/* {isUsingPlugin && ( */} | ||
| {/* {featureFlags.hasPrivateConnections && ( */} | ||
| <SideMenuItem | ||
| name="Private Connections" | ||
| icon={PadlockIcon} | ||
| activeIconColor="text-text-bright" | ||
| inactiveIconColor="text-text-dimmed" | ||
| to={v3PrivateConnectionsPath(organization)} | ||
| data-action="private-connections" | ||
| /> | ||
| {/* )} */} | ||
| <SideMenuItem | ||
| name="Roles" | ||
| icon={RolesIcon} | ||
| activeIconColor="text-text-bright" | ||
| inactiveIconColor="text-text-dimmed" | ||
| to={organizationRolesPath(organization)} | ||
| data-action="roles" | ||
| /> | ||
| {/* )} */} |
There was a problem hiding this comment.
🚩 Feature flag guards for Private Connections and Roles removed from sidebar — routes still guard access
The hasPrivateConnections feature flag guard and the isUsingPlugin guard for Roles have been commented out (apps/webapp/app/components/navigation/OrganizationSettingsSideMenu.tsx:124-143), making both menu items visible to all users regardless of their entitlements. This is not a bug because the route loaders themselves still enforce access: _app.orgs.$organizationSlug.settings.private-connections._index/route.tsx calls canAccessPrivateConnections() (which checks the hasPrivateConnections feature flag in apps/webapp/app/v3/canAccessPrivateConnections.server.ts), and the Roles route checks rbac.isUsingPlugin(). However, users without access will now see a link in the sidebar that leads to a page that may redirect or show an error/upsell, which could be a confusing UX. The commented-out guards ({/* {isUsingPlugin && ( */}, {/* {featureFlags.hasPrivateConnections && ( */}) suggest this might be a WIP change that needs cleanup before merge.
Was this helpful? React with 👍 or 👎 to provide feedback.
- Add FINAL + _is_deleted = 0 to all task_runs_v2 queries (ReplacingMergeTree) - Add organization_id + project_id filters to engage the sort-key prefix - Add inserted_at partition filter to llm_metrics_v1 queries Covers UnifiedTaskList, TaskDetail, AgentDetail (runs/sessions/LLM), TasksDashboard. Activity counts will read accurately and queries will prune partitions instead of full-environment scans. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Both TaskListPresenter and AgentListPresenter now accept an optional pre-resolved currentWorker; UnifiedTaskListPresenter does the lookup once and passes it down, eliminating one redundant Postgres round-trip per page load. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
getLimit -> getLimits -> client.currentPlan() was duplicating the same upstream HTTP call that getCurrentPlan() also makes. Derive the schedules limit directly from currentPlan.v3Subscription.plan.limits.schedules and drop the redundant getLimit() call. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Without this, a single BackgroundWorker that happens to have both a STANDARD/SCHEDULED task and an AGENT task with the same slug would have its standard running count silently overwritten by the agent state. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The JS side builds exactly 24 hour-bucket keys but CH's `now() - INTERVAL 24 HOUR` would return rows in 25 distinct hour buckets after the top of any hour. The oldest bucket was silently discarded. Align lower bound to `toStartOfHour(now() - INTERVAL 23 HOUR)` so CH returns exactly 24 buckets. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Observer + scroll listener now attach once on mount instead of on every streaming chunk (deps `[]`, not `[merged.length]`). Earlier this caused sustained CPU during fast streams. - Auto-scroll write deferred to the next animation frame so it runs after the virtualizer's layout-effect measures `getTotalSize()`. Without rAF the imperative scrollTop write races the virtualizer and the user gets "stuck half a row up" during streaming. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A shareable URL with a typo or stale kind name previously produced an unrecoverable "No tasks match your filters" state — the unrecognised strings became valid Set entries with no UI affordance to remove them. Filter unknown values out at the parse site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds parseFiniteInt() to webapp searchParams utils. parseInt() accepts garbage-suffixed numbers and returns NaN for non-numeric input, both of which silently nudge time-range and pagination semantics. Apply at the agent, standard, and scheduled task landing-page loaders. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pendingResolutionsRef previously grew unbounded over the lifetime of the component — one entry per tool call, never removed. On chatty long-lived sessions that's a slow leak plus wasted JSON.stringify equality work on every `.out` chunk. Delete the buffered entry once the overlay has landed at a terminal output-available/error/denied state. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The intentional omission of snapshotPresignedUrl and scheduleFlush from the dep array is well-commented but had no machine-readable suppression. Future refactors would silently lose the lint signal. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previously the bundle stepper only re-synced when extraSchedules/stepSize props changed. Opening the modal, typing a value, cancelling, and reopening left the stale draft visible — confusing because the new total on the summary no longer matched the user's intent. The existing `lastSubmission as any` cast matches the codebase's established pattern (8 other sites) — left as-is rather than diverging. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Major dashboard restructure plus the new task landing pages and self-serve schedules add-on integration.
Side menu
dashboardPreferencesDashboardList.tsx)Tasks (
_index— unified Tasks page)UnifiedTaskListPresentercomposesTaskListPresenter+AgentListPresenter(sharedcurrentWorkerlookup)WORKER_CREATEDso onboardingtrigger devflips the blank state automaticallyAgent landing page (
/agents/$agentParam)AgentDetailPresenterqueries ClickHouse for run activity, session activity (with FINAL onsessions_v1), and LLM cost/token activity fromllm_metrics_v1ai-chat/overviewStandard Task landing page (
/tasks/standard/$taskParam)TaskDetailPresenterfor activity + propertiesScheduled Task landing page (
/tasks/scheduled/$taskParam)/scheduleslisting page during theorigin/mainmerge):grid-rows-[auto_1fr_auto]— progress ring + "X/Y of your schedules" + Purchase / Upgrade / Request CTAPurchaseSchedulesModalextracted as a shared component (apps/webapp/app/components/schedules/PurchaseSchedulesModal.tsx) handling increase / decrease / above-quota / need-to-delete states/resources/orgs/$organizationSlug/schedules-addonSessions
data-*parts grouped under "AI SDK data parts:" labeltoSafeUrlhelper guards rendered URLs from streamed contentPlayground (Test agent)
Dashboards
/dashboards) — Run metrics, AI metrics, Create your own CTAsBuiltInDashboardsupdated; newTasksDashboardPresenterfor the tasks overviewPageHeader / shared primitives
PageTitlegains anaccessoryprop supporting string (auto-wrapped in tooltip) and ReactNodeCardprimitive used for dashboard-style chart panels throughoutCode review fixes (last batch on this branch)
FINAL+_is_deleted = 0ontask_runs_v2(ReplacingMergeTree);organization_id+project_idfilters for sort-key prefix;inserted_atpartition filter onllm_metrics_v1UnifiedTaskListPresenter: sharedcurrentWorkerlookup; slug-collision guard inmergeRunningStates; off-by-one fixed in 24h bucket alignmentScheduleListPresenter: halved platform RPCs by deriving limit fromcurrentPlaninstead of callinggetLimitrequestAnimationFramedeferral on auto-scroll to avoid virtualizer race?types=validated against known kinds; newparseFiniteInthelper applied tofrom/to/pageparamsPurchaseSchedulesModal: bundle state resets on each open instead of persisting stale draftsManual testing
Manual smoke-test plan is tracked under TRI-10883, broken into 20 sub-issues covering onboarding, self-serve schedules, side menu, the four landing pages, sessions, runs, dashboards, regressions and performance.
🤖 Generated with Claude Code