@koinzhang/paseo-plugin-activity 0.7.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +33 -2
  2. package/README.md +6 -6
  3. package/client/activity-heatmap.tsx +1 -1
  4. package/client/agent-creations.tsx +4 -3
  5. package/client/attention-pill.tsx +1 -1
  6. package/client/design-tokens.ts +14 -2
  7. package/client/global-surface.tsx +12 -5
  8. package/client/hourly-activity-timeline.tsx +27 -10
  9. package/client/panel.tsx +11 -3
  10. package/client/pill.tsx +1 -1
  11. package/client/provider-dropdown.tsx +6 -3
  12. package/client/ranking-bars.tsx +8 -5
  13. package/client/sidebar-item.tsx +15 -0
  14. package/client/ui.tsx +17 -5
  15. package/client/usage-popover.tsx +10 -3
  16. package/client/workspace/agent-row.tsx +11 -4
  17. package/client/workspace/agents-section.tsx +32 -50
  18. package/client/workspace/constants.ts +2 -0
  19. package/client/workspace/display-menu.tsx +1 -1
  20. package/client/workspace/panel.tsx +7 -1
  21. package/client/workspace/rank-section.tsx +4 -3
  22. package/client/workspace/running-indicator-motion.ts +3 -0
  23. package/client/workspace/running-indicator.test.ts +15 -0
  24. package/client/workspace/running-indicator.tsx +3 -2
  25. package/client/workspace/terminals-section.tsx +12 -4
  26. package/index.client.tsx +13 -11
  27. package/index.server.ts +20 -38
  28. package/package.json +3 -3
  29. package/paseo-plugin.json +1 -1
  30. package/server/agents.test.ts +2 -0
  31. package/server/handlers.ts +6 -0
  32. package/server/host-types.ts +8 -7
  33. package/server/ingest.test.ts +2 -0
  34. package/server/messages.test.ts +1 -1
  35. package/server/turn-ingest.test.ts +303 -0
  36. package/server/turn-ingest.ts +75 -0
  37. package/shared/insights.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,33 @@ All notable changes to `@koinzhang/paseo-plugin-activity` are documented in this
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.8.1] - 2026-11-26
9
+
10
+ Requires Paseo **>= 0.17.4**.
11
+
12
+ ### Changed
13
+
14
+ - Pin the plugin SDK and its client / protocol peers to 0.17.4 in the development lockfile; older SDK types are no longer supported by this checkout.
15
+ - Read the latest complete turn with `timeline.refetch({ direction: "tail", limit: 1, wholeTurns: true })` and keep only entries matching the hook's `turnId`. Historical backfill retains its 500-item pages and checkpoints.
16
+
17
+ ### Fixed
18
+
19
+ - Restore the Workspace running ring's continuous rotation on Web by using the JS animation driver there; iOS and Android retain the native driver (088).
20
+ - Derive timeline item types from the actual refetch result instead of the removed `agent.turn.after.timeline` field.
21
+ - Await real turn ingestion in the hook and honor its cancellation signal, preventing late responses from writing after SQLite closes.
22
+
23
+ ## [0.8.0] - 2026-11-05
24
+
25
+ Requires Paseo **>= 0.15.0**.
26
+
27
+ ### Changed
28
+
29
+ - Align the plugin SDK with Paseo 0.15 (`@getpaseo/plugin@0.15.1`): the global page is a screen with a sidebar header row (replacing the deprecated `addSurface` / `addSidebarItem`), the agent panel registers through `addAgentPanel` and reads `params.agentId`, UI components import from `@getpaseo/plugin/client/ui`, and lifecycle hooks use `server.addHook` (`agent.create.after`, `agent.archive.after`, `agent.turn.after`).
30
+
31
+ ### Fixed
32
+
33
+ - Tool calls are recorded as soon as a turn ends again. Paseo 0.13+ sends an empty `timeline` in the turn-ended hook, so the plugin reads the recent history back with `timeline.refetch`; the background scan still owns full history.
34
+
8
35
  ## [0.7.0] - 2026-09-27
9
36
 
10
37
  ### Added
@@ -16,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
16
43
  - Heatmap, Last 30 days histogram and Timeline each get a Sessions / Prompts / Skill calls / MCP calls switch (default Sessions); the timeline draws a single series for the chosen metric.
17
44
  - Global KPI tiles compare against the previous 7 days: Sessions / Prompts show the change vs prev. 7d, Top provider / Top model show the previous window's leader; the provider filter applies to both windows.
18
45
  - Providers and Projects rankings collapse to five rows with a `Show N more` / `Show less` toggle.
46
+ - Global chart motion: ranking bars and Daily Activity bars grow from zero and transition when the metric changes, the Activity Calendar sweeps in by week column, and the Hourly Activity plot grows from its baseline (081).
19
47
 
20
48
  ### Changed
21
49
 
@@ -25,7 +53,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
25
53
  - Global filter bar: the range chips are gone (the page is all-time) and provider chips became a `Provider: All ▾` dropdown listing every provider instead of the top 5.
26
54
  - Global KPI: Sessions, Prompts, Top provider · share, Top model · share. Active days, Peak weekday and Longest streak moved into Insights.
27
55
  - User-sent messages are called **Prompts** in every Activity view; the Workspace "Show → Prompt" preview is now "Latest prompt".
28
- - Most used models lists every model; skills / MCP stay capped at 8.
56
+ - Most used skills / MCP / models list every item; the column is as tall as the Insights column and scrolls beyond it, resetting to the top when the list kind changes (082).
29
57
  - The heatmap no longer shows the Daily / Weekly / Cumulative switch (always daily).
30
58
  - Global chart titles name their granularity: Activity Calendar (heatmap), Daily Activity (30-day histogram), Hourly Activity (timeline).
31
59
  - Activity insights put Longest streak and Peak weekday above Workspaces.
@@ -37,6 +65,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
37
65
  - The Global `Provider: All ▾` filter is right-aligned in the content area, and its menu opens right-aligned under the trigger.
38
66
  - Oh My Pi (`omp`) is counted as its own provider everywhere instead of being merged into Pi; stored data is unchanged.
39
67
  - KPI fit-to-width accounts for the tile divider, so values that just fit no longer ellipsize by a pixel.
68
+ - The Hourly Activity line meets cleanly at each hour with rounded joins instead of sheared border spikes (079).
40
69
 
41
70
  ## [0.6.0] - 2026-09-22
42
71
 
@@ -188,7 +217,9 @@ Last release that supports Paseo **0.8.0**. Later versions require Paseo **>= 0.
188
217
  - Command Center entries: open panels and export a markdown usage report.
189
218
  - Plugin renamed from `tool-usage` to `activity`, migrating the old data directory automatically.
190
219
 
191
- [Unreleased]: https://github.com/koinzhang/paseo-plugins/compare/activity-v0.7.0...HEAD
220
+ [Unreleased]: https://github.com/koinzhang/paseo-plugins/compare/activity-v0.8.1...HEAD
221
+ [0.8.1]: https://github.com/koinzhang/paseo-plugins/releases/tag/activity-v0.8.1
222
+ [0.8.0]: https://github.com/koinzhang/paseo-plugins/releases/tag/activity-v0.8.0
192
223
  [0.7.0]: https://github.com/koinzhang/paseo-plugins/releases/tag/activity-v0.7.0
193
224
  [0.6.0]: https://github.com/koinzhang/paseo-plugins/releases/tag/activity-v0.6.0
194
225
  [0.5.0]: https://github.com/koinzhang/paseo-plugins/releases/tag/activity-v0.5.0
package/README.md CHANGED
@@ -26,7 +26,7 @@ Ingests every agent's Paseo timeline into a local SQLite database. Queries read
26
26
  ## Where it shows up
27
27
 
28
28
  - **Sidebar Activity** — all-time global view by provider (KPI with prev-7d comparison, Activity Calendar heatmap, Daily Activity 30-day histogram, Hourly Activity 168-hour timeline, Providers / Projects rankings, insights, most used)
29
- - **Explorer → Activity** — workspace agents as a management list (search / sort / group / status / lifecycle / archive), live attention (permission badge, status colors, running spinner; API-owned directory observation + explicit lifecycle/archive fields + 15s reconciliation), open Terminals (list / preview / close), plus workspace KPIs and Skills / MCP ranked or newest-call timeline views (with agent titles and one shared persisted view choice); usage queries get a best-effort refresh hint when agents leave running
29
+ - **Explorer → Activity** (or the Activity button in a workspace header; hidden while the panel is open) — workspace agents as a management list (search / sort / group / status / lifecycle / archive), live attention (permission badge, status colors, running spinner; API-owned directory observation + explicit lifecycle/archive fields + 15s reconciliation), open Terminals (list / preview / close), plus workspace KPIs and Skills / MCP ranked or newest-call timeline views (with agent titles and one shared persisted view choice); usage queries get a best-effort refresh hint when agents leave running
30
30
  - **Agent workspace panel** — per-agent tool detail (dense KPI including prompts / Skills / MCP toggle / SKILL.md); refreshes on timeline turn terminal events
31
31
  - **Composer pills** — Activity: current agent's skill / MCP summary (hidden when empty); **Needs attention**: other same-workspace agents with finished / permission / error (hidden when none; click opens shared list)
32
32
  - **Command Center** — Activity · Workspace Activity · Agent Activity
@@ -37,15 +37,15 @@ Everything lives on the daemon machine in `~/.paseo/plugin-data/activity/` (SQLi
37
37
 
38
38
  ## Install
39
39
 
40
- Requires Paseo **>= 0.9.0**. **0.4.0** is the last release that supports Paseo 0.8.0.
40
+ The current checkout requires Paseo **>= 0.17.4** and pins `@getpaseo/plugin` to **0.17.4**. This is an unreleased compatibility update; earlier published versions retain their own requirements: **0.8.0** requires Paseo >=0.15.0, **0.7.0** supports Paseo 0.9–0.14, and **0.4.0** supports 0.8.0.
41
41
 
42
- From Git (Paseo 0.8 and later):
42
+ From Git (Paseo 0.17.4 and later):
43
43
 
44
44
  ```bash
45
- paseo plugin add koinzhang/paseo-plugins --path activity
45
+ paseo plugin add github:koinzhang/paseo-plugins:activity
46
46
  ```
47
47
 
48
- From npm (Paseo 0.9 and later; this is the source paseo.cafe hands to Paseo 0.9+). Pin `0.4.0` on Paseo 0.8:
48
+ From npm (this is the source paseo.cafe hands to Paseo; published releases may lag this checkout). Pin a release whose runtime requirement matches your host, such as `0.8.0` for Paseo 0.15+, `0.7.0` on Paseo 0.9–0.14, or `0.4.0` on Paseo 0.8:
49
49
 
50
50
  ```bash
51
51
  paseo plugin install npm:@koinzhang/paseo-plugin-activity
@@ -86,7 +86,7 @@ This plugin is spec-driven: read [specs/README.md](./specs/README.md) before cod
86
86
 
87
87
  ## Publish
88
88
 
89
- Release history: [CHANGELOG.md](./CHANGELOG.md) (current **0.6.0**). npm releases go through a GitHub Release tag `activity-vX.Y.Z` (not push-to-`main` alone). Steps: [CONTRIBUTING.md § Publishing to npm](../CONTRIBUTING.md#publishing-to-npm).
89
+ Release history: [CHANGELOG.md](./CHANGELOG.md) (current **0.7.0**). npm releases go through a GitHub Release tag `activity-vX.Y.Z` (not push-to-`main` alone). Steps: [CONTRIBUTING.md § Publishing to npm](../CONTRIBUTING.md#publishing-to-npm).
90
90
 
91
91
  ## License
92
92
 
@@ -54,7 +54,7 @@ export function ActivityHeatmap({ days, from, colors, compact, mode }: {
54
54
  toValue: 1,
55
55
  duration: first ? CHART_MOTION.reveal : CHART_MOTION.refresh,
56
56
  easing: Easing.out(Easing.cubic),
57
- useNativeDriver: false,
57
+ useNativeDriver: true,
58
58
  });
59
59
  animation.start(() => {
60
60
  revealedRef.current = true;
@@ -13,7 +13,7 @@ import type { ActivityDay, AgentCreationDay } from "../shared/usage.ts";
13
13
  import { creationBarColor } from "./color-mix.ts";
14
14
  import { chartColorScheme, creationProviderColors } from "./rank-color.ts";
15
15
  import { fixedWindowFrom } from "./range.ts";
16
- import { CHART_MOTION, RADIUS, TEXT, sectionTitle, titleGap } from "./design-tokens.ts";
16
+ import { CHART_MOTION, PRESS, RADIUS, TEXT, sectionTitle, titleGap } from "./design-tokens.ts";
17
17
  import { messagesFor } from "../shared/i18n.ts";
18
18
  import { ChartTooltip, InlineEmpty, MetricStepper } from "./ui.tsx";
19
19
 
@@ -127,12 +127,13 @@ export function AgentCreations({ days, activityDays, windowDays, colors, compact
127
127
  onFocus={() => setHovered(bucket.key)}
128
128
  onBlur={() => setHovered(null)}
129
129
  onPress={() => setSelected((prev) => (prev === bucket.key ? null : bucket.key))}
130
- style={{
130
+ style={({ pressed }) => ({
131
131
  flex: 1,
132
132
  minWidth: 3,
133
133
  height: chartHeight,
134
134
  justifyContent: "flex-end",
135
- }}
135
+ opacity: pressed ? PRESS.opacity : 1,
136
+ })}
136
137
  >
137
138
  <DayBar
138
139
  height={
@@ -3,7 +3,7 @@ import {
3
3
  type PluginButtonRegistration,
4
4
  type PluginClientContext,
5
5
  } from "@getpaseo/plugin/client";
6
- import { Icon } from "@getpaseo/plugin/client/react-native";
6
+ import { Icon } from "@getpaseo/plugin/client/ui";
7
7
  import { useMemo } from "react";
8
8
  import {
9
9
  attentionPillIconName,
@@ -121,6 +121,16 @@ export const CONTROL = {
121
121
  pillBadgeHeight: 18,
122
122
  } as const;
123
123
 
124
+ /** Press feedback (084): compact controls scale down, text-only targets dim. */
125
+ export const PRESS = {
126
+ /** Icon / compact controls (icon buttons, row actions). */
127
+ scale: 0.94,
128
+ /** Opacity for controls that also scale. */
129
+ opacity: 0.7,
130
+ /** Opacity for text-only targets (tabs, links, text buttons). */
131
+ textOpacity: 0.6,
132
+ } as const;
133
+
124
134
  export const iconButton: ViewStyle = {
125
135
  width: CONTROL.iconButton,
126
136
  height: CONTROL.iconButton,
@@ -134,12 +144,14 @@ export const iconButton: ViewStyle = {
134
144
  * Global chart motion (081): `grow` for bars reaching a new value, `reveal` /
135
145
  * `refresh` for the heatmap's first column sweep and later metric / range
136
146
  * switches. `refreshFloor` is the lowest column opacity during a refresh.
137
- * `disclose` is the ranking Show more / Show less height transition.
138
- * `step` / `stepOffset` slide the metric switch label in from the pressed side.
147
+ * `disclose` is the ranking Show more / Show less height transition; exits
148
+ * (`discloseClose`) stay faster than enters. `step` / `stepOffset` slide the
149
+ * metric switch label in from the pressed side.
139
150
  */
140
151
  export const CHART_MOTION = {
141
152
  grow: 400,
142
153
  disclose: 250,
154
+ discloseClose: 180,
143
155
  step: 200,
144
156
  stepOffset: 12,
145
157
  reveal: 700,
@@ -1,5 +1,5 @@
1
1
  import { type PluginSurfaceProps, useRpc } from "@getpaseo/plugin/client";
2
- import { Icon } from "@getpaseo/plugin/client/react-native";
2
+ import { Icon } from "@getpaseo/plugin/client/ui";
3
3
  import { keepPreviousData, useQuery } from "@tanstack/react-query";
4
4
  import { useEffect, useMemo, useState, type ReactNode } from "react";
5
5
  import {
@@ -33,7 +33,7 @@ import { useAppLanguage } from "./use-app-language.ts";
33
33
  import { buildActivityInsights, buildActivityKpi } from "../shared/insights.ts";
34
34
  import { fixedWindowFrom } from "./range.ts";
35
35
  import { useRegisterOpenAgent } from "./open-agent.ts";
36
- import { ICON_SIZE, ROW_PADDING, TEXT, pageLayout, titleGap } from "./design-tokens.ts";
36
+ import { CONTROL, ICON_SIZE, ROW_PADDING, TEXT, pageLayout, titleGap } from "./design-tokens.ts";
37
37
  import { messagesFor, type Messages } from "../shared/i18n.ts";
38
38
  import {
39
39
  ErrorState,
@@ -121,6 +121,7 @@ function RankList({
121
121
  items: RankItem[];
122
122
  empty: string;
123
123
  styles: {
124
+ columnHeader: ViewStyle;
124
125
  rankRow: ViewStyle;
125
126
  rankName: TextStyle;
126
127
  rankMeta: TextStyle;
@@ -139,7 +140,7 @@ function RankList({
139
140
  const [rowHeight, setRowHeight] = useState(0);
140
141
  return (
141
142
  <View style={{ gap: ROW_GAP }}>
142
- <View style={{ marginBottom: titleGap(compact) - 2 }}>
143
+ <View style={styles.columnHeader}>
143
144
  <SectionHeader title={title} colors={colors} compact={compact}>
144
145
  {headerAction ? (
145
146
  <IconButton
@@ -556,6 +557,12 @@ export function GlobalUsageSurface({ theme, layout, navigation }: PluginSurfaceP
556
557
  minWidth: 0,
557
558
  width: layout.compact ? ("100%" as const) : undefined,
558
559
  },
560
+ // Reserve the rank switch button's height in both columns (083).
561
+ columnHeader: {
562
+ minHeight: CONTROL.iconButton,
563
+ justifyContent: "center" as const,
564
+ marginBottom: titleGap(layout.compact) - ROW_GAP,
565
+ },
559
566
  insightRow: {
560
567
  flexDirection: "row" as const,
561
568
  alignItems: "baseline" as const,
@@ -692,8 +699,8 @@ export function GlobalUsageSurface({ theme, layout, navigation }: PluginSurfaceP
692
699
  {showContent ? (
693
700
  <View style={styles.columns}>
694
701
  <View style={styles.column}>
695
- <View style={{ gap: 2 }}>
696
- <View style={{ marginBottom: titleGap(layout.compact) - 2 }}>
702
+ <View style={{ gap: ROW_GAP }}>
703
+ <View style={styles.columnHeader}>
697
704
  <SectionHeader title={m.insights.title} colors={theme.colors} compact={layout.compact} />
698
705
  </View>
699
706
  {insights.map((row) => (
@@ -152,6 +152,8 @@ export function HourlyActivityTimeline({
152
152
  const [hovered, setHovered] = useState<string | null>(null);
153
153
  const [plotTop, setPlotTop] = useState(0);
154
154
  const [metric, setMetric] = useState<ActivityMetric>("sessions");
155
+ // Keep the outgoing metric visible until its plot reaches the baseline.
156
+ const [displayedMetric, setDisplayedMetric] = useState<ActivityMetric>("sessions");
155
157
  const m = messagesFor(locale);
156
158
 
157
159
  const plotHeight = compact ? 67 : 89;
@@ -198,9 +200,9 @@ export function HourlyActivityTimeline({
198
200
  }, [resetKey]);
199
201
 
200
202
  const { values, peak } = useMemo(() => {
201
- const values = hours.map((hour) => metricValue(hour, metric));
203
+ const values = hours.map((hour) => metricValue(hour, displayedMetric));
202
204
  return { values, peak: values.reduce((max, value) => Math.max(max, value), 0) };
203
- }, [hours, metric]);
205
+ }, [hours, displayedMetric]);
204
206
 
205
207
  /** Local midnights become axis ticks. */
206
208
  const dayTicks = useMemo(
@@ -228,21 +230,36 @@ export function HourlyActivityTimeline({
228
230
  const ready = hours.length > 0 && slot > 0;
229
231
  const grow = useRef(new Animated.Value(0)).current;
230
232
  const revealedRef = useRef(false);
233
+ const previousResetKey = useRef(resetKey);
231
234
  useEffect(() => {
232
- if (!ready) return;
235
+ if (!ready) {
236
+ grow.setValue(0);
237
+ return;
238
+ }
239
+ const providerChanged = previousResetKey.current !== resetKey;
240
+ previousResetKey.current = resetKey;
241
+ let cancelled = false;
233
242
  const first = !revealedRef.current;
234
- grow.setValue(0);
243
+ const exiting = metric !== displayedMetric;
244
+ if (providerChanged && !exiting) grow.setValue(0);
235
245
  const animation = Animated.timing(grow, {
236
- toValue: 1,
237
- duration: first ? CHART_MOTION.reveal : CHART_MOTION.refresh,
246
+ toValue: exiting ? 0 : 1,
247
+ duration: exiting
248
+ ? CHART_MOTION.discloseClose
249
+ : first ? CHART_MOTION.reveal : CHART_MOTION.refresh,
238
250
  easing: Easing.out(Easing.cubic),
239
- useNativeDriver: false,
251
+ useNativeDriver: true,
240
252
  });
241
- animation.start(() => {
253
+ animation.start(({ finished }) => {
254
+ if (cancelled || !finished) return;
242
255
  revealedRef.current = true;
256
+ if (exiting) setDisplayedMetric(metric);
243
257
  });
244
- return () => animation.stop();
245
- }, [ready, metric, resetKey, grow]);
258
+ return () => {
259
+ cancelled = true;
260
+ animation.stop();
261
+ };
262
+ }, [ready, metric, displayedMetric, resetKey, grow]);
246
263
 
247
264
  // Stable element identity: hovering must not rebuild ~330 skewed segments.
248
265
  const series = useMemo(
package/client/panel.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type PluginAgentPanelProps, useAgent, useRpc } from "@getpaseo/plugin/client";
2
- import { Icon } from "@getpaseo/plugin/client/react-native";
2
+ import { Icon } from "@getpaseo/plugin/client/ui";
3
3
  import { useQuery, useQueryClient } from "@tanstack/react-query";
4
4
  import { useEffect, useMemo, useState } from "react";
5
5
  import { useRegisterOpenAgent } from "./open-agent.ts";
@@ -32,6 +32,7 @@ import {
32
32
  } from "./ui.tsx";
33
33
  import {
34
34
  ICON_SIZE,
35
+ PRESS,
35
36
  RADIUS,
36
37
  ROW_PADDING,
37
38
  TEXT,
@@ -48,7 +49,8 @@ type SkillDetail = {
48
49
  };
49
50
 
50
51
 
51
- export function UsagePanel({ theme, layout, agentId, navigation }: PluginAgentPanelProps) {
52
+ export function UsagePanel({ theme, layout, params, navigation }: PluginAgentPanelProps) {
53
+ const { agentId } = params;
52
54
  const locale = useAppLanguage();
53
55
  const m = useMessages();
54
56
  const [tab, setTab] = useState<TabId | null>(null);
@@ -260,7 +262,10 @@ export function UsagePanel({ theme, layout, agentId, navigation }: PluginAgentPa
260
262
  clearPendingSkillOpen(agentId);
261
263
  setSkillDetail(null);
262
264
  }}
263
- style={styles.backRow}
265
+ style={({ pressed }) => [
266
+ styles.backRow,
267
+ pressed ? { opacity: PRESS.textOpacity } : null,
268
+ ]}
264
269
  >
265
270
  <Icon name="ChevronLeft" size={ICON_SIZE.action} color={theme.colors.foregroundMuted} />
266
271
  <Text style={styles.back}>{m.common.skills}</Text>
@@ -344,6 +349,9 @@ export function UsagePanel({ theme, layout, agentId, navigation }: PluginAgentPa
344
349
  onPress={() =>
345
350
  setSkillDetail({ skillName: item.skillName, path: item.skillPath! })
346
351
  }
352
+ style={({ pressed }) =>
353
+ pressed ? { opacity: PRESS.textOpacity } : undefined
354
+ }
347
355
  >
348
356
  <Text style={styles.listLink} numberOfLines={1}>
349
357
  {name}
package/client/pill.tsx CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  type PluginButtonRegistration,
8
8
  type PluginClientContext,
9
9
  } from "@getpaseo/plugin/client";
10
- import { Icon } from "@getpaseo/plugin/client/react-native";
10
+ import { Icon } from "@getpaseo/plugin/client/ui";
11
11
  import { useEffect, useRef } from "react";
12
12
  import { formatUsagePillLabel, usageSkillsByNameRpc, usageMcpByToolRpc } from "../shared/usage.ts";
13
13
  import { useUsagePillData, clearPillDataCache } from "./usage-query.tsx";
@@ -1,7 +1,7 @@
1
- import { Icon } from "@getpaseo/plugin/client/react-native";
1
+ import { Icon } from "@getpaseo/plugin/client/ui";
2
2
  import { useState, type ReactNode } from "react";
3
3
  import { Platform, Pressable, ScrollView, Text, View } from "react-native";
4
- import { CONTROL, FONT_WEIGHT, ICON_SIZE, RADIUS, TEXT } from "./design-tokens.ts";
4
+ import { CONTROL, FONT_WEIGHT, ICON_SIZE, PRESS, RADIUS, TEXT } from "./design-tokens.ts";
5
5
 
6
6
  const MENU_MIN_WIDTH = 200;
7
7
  const MENU_ROW_HEIGHT = 28;
@@ -49,7 +49,10 @@ export function ProviderDropdown({
49
49
  accessibilityState={{ expanded: open }}
50
50
  hitSlop={CONTROL.hitSlop}
51
51
  onPress={() => setOpen((prev) => !prev)}
52
- style={{ flexDirection: "row", alignItems: "center", gap: 4, paddingVertical: 6 }}
52
+ style={({ pressed }) => [
53
+ { flexDirection: "row", alignItems: "center", gap: 4, paddingVertical: 6 },
54
+ pressed ? { opacity: PRESS.textOpacity } : null,
55
+ ]}
53
56
  >
54
57
  <Text style={{ ...TEXT.body, color: colors.foregroundMuted }}>{label}:</Text>
55
58
  <Text style={{ ...TEXT.body, fontWeight: FONT_WEIGHT.semibold, color: colors.foreground }} numberOfLines={1}>
@@ -1,9 +1,9 @@
1
- import { Icon } from "@getpaseo/plugin/client/react-native";
1
+ import { Icon } from "@getpaseo/plugin/client/ui";
2
2
  import { useEffect, useMemo, useRef, useState, type ReactNode } from "react";
3
3
  import { Animated, Easing, Pressable, Text, View } from "react-native";
4
4
  import { metricValue, type ActivityMetric } from "../shared/activity.ts";
5
5
  import { messagesFor } from "../shared/i18n.ts";
6
- import { CHART_MOTION, CONTROL, ICON_SIZE, RADIUS, ROW_PADDING, TEXT, pillRadius, sectionTitle, titleGap } from "./design-tokens.ts";
6
+ import { CHART_MOTION, CONTROL, ICON_SIZE, PRESS, RADIUS, ROW_PADDING, TEXT, pillRadius, sectionTitle, titleGap } from "./design-tokens.ts";
7
7
  import { InlineEmpty, MetricStepper } from "./ui.tsx";
8
8
 
9
9
  const BAR_HEIGHT = 6;
@@ -133,7 +133,10 @@ export function RankingBars({ title, empty, entries, highlight, colors, compact,
133
133
  accessibilityState={{ expanded }}
134
134
  hitSlop={CONTROL.hitSlop}
135
135
  onPress={toggle}
136
- style={{ alignSelf: "flex-end", flexDirection: "row", alignItems: "center", gap: 4, paddingVertical: ROW_PADDING.dense }}
136
+ style={({ pressed }) => [
137
+ { alignSelf: "flex-end", flexDirection: "row", alignItems: "center", gap: 4, paddingVertical: ROW_PADDING.dense },
138
+ pressed ? { opacity: PRESS.textOpacity } : null,
139
+ ]}
137
140
  >
138
141
  <Text style={{ ...TEXT.body, color: colors.foregroundMuted }}>{toggleLabel}</Text>
139
142
  <Animated.View
@@ -203,8 +206,8 @@ type RankedRow = RankingEntry & { value: number };
203
206
  function discloseTiming(value: Animated.Value, open: boolean): Animated.CompositeAnimation {
204
207
  return Animated.timing(value, {
205
208
  toValue: open ? 1 : 0,
206
- duration: CHART_MOTION.disclose,
207
- easing: open ? Easing.out(Easing.cubic) : Easing.in(Easing.cubic),
209
+ duration: open ? CHART_MOTION.disclose : CHART_MOTION.discloseClose,
210
+ easing: Easing.out(Easing.cubic),
208
211
  useNativeDriver: false,
209
212
  });
210
213
  }
@@ -0,0 +1,15 @@
1
+ import type { PluginSidebarItemProps } from "@getpaseo/plugin/client";
2
+ import { SidebarRow } from "@getpaseo/plugin/client/ui";
3
+
4
+ export const ACTIVITY_SCREEN_ID = "activity";
5
+
6
+ /** Sidebar header row for the global Activity screen (Paseo 0.11+ sidebar items). */
7
+ export function ActivitySidebarItem({ currentScreen, openScreen }: PluginSidebarItemProps) {
8
+ return (
9
+ <SidebarRow
10
+ icon="Activity"
11
+ active={currentScreen?.screenId === ACTIVITY_SCREEN_ID}
12
+ onPress={() => openScreen({ screenId: ACTIVITY_SCREEN_ID })}
13
+ />
14
+ );
15
+ }
package/client/ui.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { Icon } from "@getpaseo/plugin/client/react-native";
1
+ import { Icon } from "@getpaseo/plugin/client/ui";
2
2
  import { useRef, useState, type ReactNode } from "react";
3
3
  import {
4
4
  ActivityIndicator,
@@ -15,6 +15,7 @@ import {
15
15
  CONTROL,
16
16
  FONT_WEIGHT,
17
17
  ICON_SIZE,
18
+ PRESS,
18
19
  RADIUS,
19
20
  TEXT,
20
21
  iconButton,
@@ -65,7 +66,12 @@ export function IconButton({
65
66
  hitSlop={CONTROL.hitSlop}
66
67
  onPress={onPress}
67
68
  pointerEvents={hidden ? "none" : "auto"}
68
- style={[iconButton, hidden ? { opacity: 0 } : null, style]}
69
+ style={({ pressed }) => [
70
+ iconButton,
71
+ hidden ? { opacity: 0 } : null,
72
+ pressed ? { opacity: PRESS.opacity, transform: [{ scale: PRESS.scale }] } : null,
73
+ style,
74
+ ]}
69
75
  >
70
76
  {busy ? (
71
77
  <ActivityIndicator size={size} color={color} style={{ width: size, height: size }} />
@@ -131,7 +137,10 @@ export function ErrorState({
131
137
  accessibilityRole="button"
132
138
  hitSlop={CONTROL.hitSlop}
133
139
  onPress={onRetry}
134
- style={{ alignSelf: "flex-start", paddingVertical: 2 }}
140
+ style={({ pressed }) => [
141
+ { alignSelf: "flex-start", paddingVertical: 2 },
142
+ pressed ? { opacity: PRESS.textOpacity } : null,
143
+ ]}
135
144
  >
136
145
  <Text style={{ ...TEXT.small, fontWeight: FONT_WEIGHT.medium, color: colors.accent }}>
137
146
  {m.common.retry}
@@ -190,7 +199,10 @@ export function TextTabs<T extends string>({
190
199
  accessibilityRole="tab"
191
200
  accessibilityState={{ selected: active }}
192
201
  onPress={() => onChange(option.id)}
193
- style={{ paddingVertical: 6 }}
202
+ style={({ pressed }) => [
203
+ { paddingVertical: 6 },
204
+ pressed ? { opacity: PRESS.textOpacity } : null,
205
+ ]}
194
206
  >
195
207
  <Text style={{ ...text, color: active ? colors.foreground : colors.foregroundMuted }}>{option.label}</Text>
196
208
  </Pressable>
@@ -223,7 +235,7 @@ export function MetricStepper({
223
235
  toValue: 0,
224
236
  duration: CHART_MOTION.step,
225
237
  easing: Easing.out(Easing.cubic),
226
- useNativeDriver: false,
238
+ useNativeDriver: true,
227
239
  }).start();
228
240
  };
229
241
  return (
@@ -2,7 +2,7 @@ import {
2
2
  type PluginButtonContentProps,
3
3
  useRpc,
4
4
  } from "@getpaseo/plugin/client";
5
- import { Icon } from "@getpaseo/plugin/client/react-native";
5
+ import { Icon } from "@getpaseo/plugin/client/ui";
6
6
  import { useQuery } from "@tanstack/react-query";
7
7
  import { useEffect, useMemo, useState } from "react";
8
8
  import { Pressable, Text, View } from "react-native";
@@ -23,6 +23,7 @@ import {
23
23
  } from "./ui.tsx";
24
24
  import {
25
25
  ICON_SIZE,
26
+ PRESS,
26
27
  RADIUS,
27
28
  ROW_PADDING,
28
29
  TEXT,
@@ -178,7 +179,10 @@ function UsagePopoverAgent(
178
179
  <Pressable
179
180
  accessibilityRole="button"
180
181
  onPress={() => setSkillDetail(null)}
181
- style={styles.backRow}
182
+ style={({ pressed }) => [
183
+ styles.backRow,
184
+ pressed ? { opacity: PRESS.textOpacity } : null,
185
+ ]}
182
186
  >
183
187
  <Icon name="ChevronLeft" size={ICON_SIZE.action} color={theme.colors.foregroundMuted} />
184
188
  <Text style={styles.back}>{m.common.skills}</Text>
@@ -259,7 +263,10 @@ function UsagePopoverAgent(
259
263
  onPress={() =>
260
264
  setSkillDetail({ skillName: item.skillName, path: item.skillPath! })
261
265
  }
262
- style={rowStyle}
266
+ style={({ pressed }) => [
267
+ rowStyle,
268
+ pressed ? { backgroundColor: theme.colors.surface2 } : null,
269
+ ]}
263
270
  >
264
271
  {content}
265
272
  </Pressable>
@@ -1,4 +1,4 @@
1
- import { Icon } from "@getpaseo/plugin/client/react-native";
1
+ import { Icon } from "@getpaseo/plugin/client/ui";
2
2
  import { useState, type ReactNode } from "react";
3
3
  import {
4
4
  ActivityIndicator,
@@ -11,7 +11,7 @@ import {
11
11
  } from "react-native";
12
12
  import type { AgentAttentionKind, WorkspaceTheme } from "./constants.ts";
13
13
  import { RunningIndicator } from "./running-indicator.tsx";
14
- import { CONTROL, ICON_SIZE } from "../design-tokens.ts";
14
+ import { CONTROL, ICON_SIZE, PRESS } from "../design-tokens.ts";
15
15
  import { useMessages } from "../use-app-language.ts";
16
16
 
17
17
  export type AgentRowStyles = {
@@ -145,7 +145,11 @@ export function AgentRow({
145
145
  hitSlop={CONTROL.hitSlop}
146
146
  onPress={onArchiveToggle}
147
147
  pointerEvents={showAction ? "auto" : "none"}
148
- style={[styles.titleAction, { opacity: showAction ? 1 : 0 }]}
148
+ style={({ pressed }) => [
149
+ styles.titleAction,
150
+ { opacity: showAction ? 1 : 0 },
151
+ pressed ? { opacity: PRESS.opacity, transform: [{ scale: PRESS.scale }] } : null,
152
+ ]}
149
153
  >
150
154
  {busy ? (
151
155
  <ActivityIndicator
@@ -171,7 +175,10 @@ export function AgentRow({
171
175
  accessibilityRole="link"
172
176
  accessibilityLabel={`${m.common.openConversation(label)}${stateSuffix}`}
173
177
  onPress={onOpen}
174
- style={styles.agentListRow}
178
+ style={({ pressed }) => [
179
+ styles.agentListRow,
180
+ pressed ? { backgroundColor: theme.colors.surface2 } : null,
181
+ ]}
175
182
  {...hoverProps}
176
183
  >
177
184
  {body}