Skip to content

Commit 81d24b4

Browse files
authored
fix(release): refresh Cargo.lock on bump, attach uid to core Sentry, hide debug settings (tinyhumansai#1465)
1 parent 12ef69b commit 81d24b4

7 files changed

Lines changed: 87 additions & 58 deletions

File tree

.github/workflows/release-production.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ jobs:
128128
- name: Verify release version sync (main_head)
129129
if: inputs.release_source == 'main_head'
130130
run: node scripts/release/verify-version-sync.js "${{ steps.bump.outputs.version }}"
131+
- name: Refresh Cargo.lock files (main_head)
132+
if: inputs.release_source == 'main_head'
133+
# Cargo.toml [package].version is bumped above but the matching
134+
# entries in both Cargo.lock files are not — without this step the
135+
# lockfiles stay pinned to the previous version and the next local
136+
# `cargo` invocation rewrites them, leaving an uncommitted diff.
137+
run: |
138+
cargo update --workspace --manifest-path Cargo.toml
139+
cargo update --workspace --manifest-path app/src-tauri/Cargo.toml
131140
- name: Ensure tag does not already exist (main_head)
132141
if: inputs.release_source == 'main_head'
133142
env:
@@ -148,7 +157,7 @@ jobs:
148157
VERSION: ${{ steps.bump.outputs.version }}
149158
TAG: ${{ steps.bump.outputs.tag }}
150159
run: |
151-
git add app/package.json app/src-tauri/tauri.conf.json app/src-tauri/Cargo.toml Cargo.toml
160+
git add app/package.json app/src-tauri/tauri.conf.json app/src-tauri/Cargo.toml Cargo.toml app/src-tauri/Cargo.lock Cargo.lock
152161
git commit -m "chore(release): v${VERSION}"
153162
git push origin main
154163
git tag -a "$TAG" -m "Release $TAG"

.github/workflows/release-staging.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ jobs:
102102
run: node scripts/release/bump-version.js patch
103103
- name: Verify version sync
104104
run: node scripts/release/verify-version-sync.js "${{ steps.bump.outputs.version }}"
105+
- name: Refresh Cargo.lock files
106+
# Cargo.toml [package].version is bumped above but the matching
107+
# entries in both Cargo.lock files are not — without this step the
108+
# lockfiles stay pinned to the previous version and the next local
109+
# `cargo` invocation rewrites them, leaving an uncommitted diff.
110+
run: |
111+
cargo update --workspace --manifest-path Cargo.toml
112+
cargo update --workspace --manifest-path app/src-tauri/Cargo.toml
105113
- name: Compute staging tag
106114
id: tagname
107115
env:
@@ -127,7 +135,7 @@ jobs:
127135
VERSION: ${{ steps.bump.outputs.version }}
128136
TAG: ${{ steps.tagname.outputs.tag }}
129137
run: |
130-
git add app/package.json app/src-tauri/tauri.conf.json app/src-tauri/Cargo.toml Cargo.toml
138+
git add app/package.json app/src-tauri/tauri.conf.json app/src-tauri/Cargo.toml Cargo.toml app/src-tauri/Cargo.lock Cargo.lock
131139
git commit -m "chore(staging): v${VERSION}"
132140
git push origin main
133141
git tag -a "$TAG" -m "Staging cut $TAG"

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src-tauri/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/components/settings/panels/DeveloperOptionsPanel.tsx

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,24 @@ const developerItems = [
5757
</svg>
5858
),
5959
},
60-
{
61-
id: 'screen-awareness-debug',
62-
title: 'Screen Awareness Debug',
63-
description: 'FPS tuning, vision model config, capture tests, and session diagnostics',
64-
route: 'screen-awareness-debug',
65-
icon: (
66-
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
67-
<path
68-
strokeLinecap="round"
69-
strokeLinejoin="round"
70-
strokeWidth={2}
71-
d="M3 5h18v12H3zM8 21h8m-4-4v4"
72-
/>
73-
</svg>
74-
),
75-
},
60+
// Screen Awareness Debug, Memory Data, and Memory Debug hidden — routes
61+
// retained in `pages/Settings.tsx` for re-enable.
62+
// {
63+
// id: 'screen-awareness-debug',
64+
// title: 'Screen Awareness Debug',
65+
// description: 'FPS tuning, vision model config, capture tests, and session diagnostics',
66+
// route: 'screen-awareness-debug',
67+
// icon: (
68+
// <svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
69+
// <path
70+
// strokeLinecap="round"
71+
// strokeLinejoin="round"
72+
// strokeWidth={2}
73+
// d="M3 5h18v12H3zM8 21h8m-4-4v4"
74+
// />
75+
// </svg>
76+
// ),
77+
// },
7678
// Autocomplete Debug + Voice Debug hidden per #717 (routes retained for re-enable).
7779
{
7880
id: 'local-model-debug',
@@ -106,38 +108,38 @@ const developerItems = [
106108
</svg>
107109
),
108110
},
109-
{
110-
id: 'memory-data',
111-
title: 'Memory Data',
112-
description: 'Knowledge graph, insights, activity heatmap, and file management',
113-
route: 'memory-data',
114-
icon: (
115-
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
116-
<path
117-
strokeLinecap="round"
118-
strokeLinejoin="round"
119-
strokeWidth={2}
120-
d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"
121-
/>
122-
</svg>
123-
),
124-
},
125-
{
126-
id: 'memory-debug',
127-
title: 'Memory Debug',
128-
description: 'Inspect memory documents, namespaces, and test query/recall',
129-
route: 'memory-debug',
130-
icon: (
131-
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
132-
<path
133-
strokeLinecap="round"
134-
strokeLinejoin="round"
135-
strokeWidth={2}
136-
d="M9 12h6m2 8H7a2 2 0 01-2-2V6a2 2 0 012-2h6l6 6v8a2 2 0 01-2 2z"
137-
/>
138-
</svg>
139-
),
140-
},
111+
// {
112+
// id: 'memory-data',
113+
// title: 'Memory Data',
114+
// description: 'Knowledge graph, insights, activity heatmap, and file management',
115+
// route: 'memory-data',
116+
// icon: (
117+
// <svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
118+
// <path
119+
// strokeLinecap="round"
120+
// strokeLinejoin="round"
121+
// strokeWidth={2}
122+
// d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"
123+
// />
124+
// </svg>
125+
// ),
126+
// },
127+
// {
128+
// id: 'memory-debug',
129+
// title: 'Memory Debug',
130+
// description: 'Inspect memory documents, namespaces, and test query/recall',
131+
// route: 'memory-debug',
132+
// icon: (
133+
// <svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
134+
// <path
135+
// strokeLinecap="round"
136+
// strokeLinejoin="round"
137+
// strokeWidth={2}
138+
// d="M9 12h6m2 8H7a2 2 0 01-2-2V6a2 2 0 012-2h6l6 6v8a2 2 0 01-2 2z"
139+
// />
140+
// </svg>
141+
// ),
142+
// },
141143
{
142144
id: 'intelligence',
143145
title: 'Intelligence',

app/src/components/settings/panels/ScreenIntelligencePanel.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const formatRemaining = (remainingMs: number | null): string => {
2020
};
2121

2222
const ScreenIntelligencePanel = () => {
23-
const { navigateBack, navigateToSettings, breadcrumbs } = useSettingsNavigation();
23+
const { navigateBack, breadcrumbs } = useSettingsNavigation();
2424
const {
2525
status,
2626
lastRestartSummary,
@@ -237,15 +237,16 @@ const ScreenIntelligencePanel = () => {
237237
</div>
238238
)}
239239

240-
<button
240+
{/* Screen Awareness Debug entry hidden alongside Developer Options entries. */}
241+
{/* <button
241242
type="button"
242243
onClick={() => navigateToSettings('screen-awareness-debug')}
243244
className="flex items-center gap-1.5 text-xs text-stone-400 hover:text-stone-600 transition-colors">
244245
Advanced settings
245246
<svg className="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
246247
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
247248
</svg>
248-
</button>
249+
</button> */}
249250
</div>
250251
</div>
251252
);

src/main.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,17 @@ fn main() {
4848
before_send: Some(std::sync::Arc::new(|mut event| {
4949
// Strip server_name (hostname) to avoid leaking machine identity
5050
event.server_name = None;
51-
// Strip user context entirely
52-
event.user = None;
51+
// Attach the cached account uid so Sentry can count unique users
52+
// affected by an issue. We only carry `id` — never email, name,
53+
// or IP — so this stays consistent with `send_default_pii: false`.
54+
// Empty/missing on early-startup events (cache populates after
55+
// the first `auth_get_me` RPC); that's expected.
56+
event.user = openhuman_core::openhuman::app_state::peek_cached_current_user_identity()
57+
.and_then(|identity| identity.id)
58+
.map(|id| sentry::User {
59+
id: Some(id),
60+
..Default::default()
61+
});
5362
// Scrub exception messages for secrets
5463
for exc in &mut event.exception.values {
5564
if let Some(ref value) = exc.value {

0 commit comments

Comments
 (0)