Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

Linux: read call names from the new Zoom Workplace window (#31)

Francesco Tenacef3fc3e16e595
diff --git a/app/native/yogurt-system/src/atspi.rs b/app/native/yogurt-system/src/atspi.rs
index 1a127e5a..0ce31fc4 100644
--- a/app/native/yogurt-system/src/atspi.rs
+++ b/app/native/yogurt-system/src/atspi.rs
@@ -135,7 +135,15 @@ impl A11y {
}
fn props(&self, bus: &str, path: &OwnedObjectPath) -> HashMap<String, OwnedValue> {
- self.call(bus, path.as_str(), PROPERTIES, "GetAll", &(ACCESSIBLE,)).unwrap_or_default()
+ // Qt's AT-SPI adaptor (Zoom) does not implement GetAll and crashes when asked; the two properties are
+ // asked for one at a time, which every app answers
+ let mut out = HashMap::new();
+ for key in ["Name", "Description"] {
+ if let Ok(v) = self.call(bus, path.as_str(), PROPERTIES, "Get", &(ACCESSIBLE, key)) {
+ out.insert(key.to_string(), v);
+ }
+ }
+ out
}
fn attrs(&self, bus: &str, path: &OwnedObjectPath) -> HashMap<String, String> {
diff --git a/app/native/yogurt-system/src/calls.rs b/app/native/yogurt-system/src/calls.rs
index 4a66a085..6cacbfa3 100644
--- a/app/native/yogurt-system/src/calls.rs
+++ b/app/native/yogurt-system/src/calls.rs
@@ -174,7 +174,7 @@ fn is_call_tree(tree: &Value) -> bool {
fn call_window(kind: Kind, title: &str) -> bool {
match kind {
Kind::Teams => true,
- Kind::Zoom => title.starts_with("Zoom Meeting") || title.starts_with("Zoom Webinar"),
+ Kind::Zoom => title.starts_with("Zoom Meeting") || title.starts_with("Zoom Webinar") || title == "Meeting",
Kind::Meet => has_word(title, "meet"),
}
}
@@ -269,6 +269,7 @@ mod tests {
assert!(call_window(Kind::Meet, "meet.google.com"));
assert!(!call_window(Kind::Meet, "Meeting notes - Google Chrome"));
assert!(call_window(Kind::Zoom, "Zoom Meeting"));
+ assert!(call_window(Kind::Zoom, "Meeting"));
assert!(call_window(Kind::Zoom, "Zoom Webinar - 123"));
assert!(!call_window(Kind::Zoom, "Zoom Workplace"));
}
diff --git a/app/src/main/callNames/parse.ts b/app/src/main/callNames/parse.ts
index 90f85e1a..05dd6b5b 100644
--- a/app/src/main/callNames/parse.ts
+++ b/app/src/main/callNames/parse.ts
@@ -86,8 +86,24 @@ export function zoomTile(description: string): { name: string; talking: boolean
return name ? { name, talking } : null
}
+// Linux's Zoom Workplace draws each video tile as a push button named "video item <name>", with " Active Speaker"
+// appended on the active-speaker view (Zoom 7.2.1: the only tile carries it even in a call of one). The words are
+// English only as measured; another language reads as nothing rather than a wrong name.
+const LINUX_TILE = /^video item\s+(.+)$/i
+const LINUX_ACTIVE = /\s+active speaker$/i
+
+/** "video item Ana Ruiz Active Speaker" → Ana Ruiz, talking; null when it isn't a tile */
+export function zoomLinuxTile(name: string): { name: string; talking: boolean } | null {
+ const m = LINUX_TILE.exec(name.normalize('NFKC').trim())
+ if (!m) return null
+ const talking = LINUX_ACTIVE.test(m[1])
+ const person = cleanZoom(m[1].replace(LINUX_ACTIVE, ''))
+ return person && person.length <= 60 ? { name: person, talking } : null
+}
+
function readZoom(windows: AxWindow[]): CallReading {
const speaking: string[] = [], participants: string[] = []
+ const linuxTiles: Array<{ name: string; talking: boolean }> = []
let me: string | null = null
for (const w of windows) {
walk(w.tree, (n, up) => {
@@ -95,6 +111,13 @@ function readZoom(windows: AxWindow[]): CallReading {
const tile = zoomTile(n.d)
if (tile) { participants.push(tile.name); if (tile.talking) speaking.push(tile.name) }
}
+ // the Linux Zoom Workplace tile is a push button named "video item <name> [Active Speaker]"
+ if (n.r === 'push button' || n.r === 'toggle button') {
+ for (const raw of [n.t, n.d]) {
+ const tile = raw ? zoomLinuxTile(raw) : null
+ if (tile) { participants.push(tile.name); linuxTiles.push(tile) }
+ }
+ }
// the floating window's "Talking: Name"; AT-SPI labels carry it as their name
if (STATIC_TEXT.has(n.r)) {
for (const raw of [n.v, n.t]) {
@@ -115,6 +138,9 @@ function readZoom(windows: AxWindow[]): CallReading {
}
})
}
+ // The Linux view always says "Active Speaker" on the tile it is showing, even with one person in the call, so the
+ // mark is trusted only with three or more tiles (the same threshold the Mac mark has).
+ if (uniq(linuxTiles.map((t) => t.name)).length >= 3) for (const t of linuxTiles) if (t.talking) speaking.push(t.name)
return { speaking: uniq(speaking), participants: uniq(participants), me }
}
diff --git a/app/test/callParse.test.ts b/app/test/callParse.test.ts
index ff8e8b04..65b36df3 100644
--- a/app/test/callParse.test.ts
+++ b/app/test/callParse.test.ts
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest'
-import { readCall, summarize, zoomTile, type AxNode, type AxWindow } from '../src/main/callNames/parse'
+import { readCall, summarize, zoomLinuxTile, zoomTile, type AxNode, type AxWindow } from '../src/main/callNames/parse'
const node = (r: string, o: Partial<AxNode> = {}, ...k: AxNode[]): AxNode => ({ r, ...o, ...(k.length ? { k } : {}) })
const win = (tree: AxNode, title?: string): AxWindow => ({ title, tree })
@@ -60,6 +60,26 @@ describe('Zoom', () => {
node('tree table', { t: 'Participants list' }, node('table row', {}, node('label', { t: 'Alex Morgan (me)' }))))
expect(readCall('zoom', [win(tree)])).toEqual({ speaking: ['Ana Ruiz', 'Ann Lee'], participants: ['Ana Ruiz', 'Alex Morgan'], me: 'Alex Morgan' })
})
+
+ it('reads the Linux Zoom Workplace tile: a push button named "video item <name>"', () => {
+ expect(zoomLinuxTile('video item Ana Ruiz Active Speaker')).toEqual({ name: 'Ana Ruiz', talking: true })
+ expect(zoomLinuxTile('video item Ana Ruiz')).toEqual({ name: 'Ana Ruiz', talking: false })
+ // a one-word name is a name
+ expect(zoomLinuxTile('video item Madonna')).toEqual({ name: 'Madonna', talking: false })
+ // not a tile
+ expect(zoomLinuxTile('share content item')).toBeNull()
+ expect(zoomLinuxTile('video item')).toBeNull()
+ })
+
+ it('the Linux window names the call from its tiles, and trusts the speaker mark only with three or more', () => {
+ const tile = (name: string, active = false) => node('push button', { t: `video item ${name}${active ? ' Active Speaker' : ''}` })
+ const meeting = (...tiles: AxNode[]) => win(node('frame', { t: 'Meeting' }, node('panel', {}, ...tiles)), 'Meeting')
+ expect(readCall('zoom', [meeting(tile('Alex Morgan', true), tile('Dana Smith'), tile('Ann Lee'))]))
+ .toEqual({ speaking: ['Alex Morgan'], participants: ['Alex Morgan', 'Dana Smith', 'Ann Lee'], me: null })
+ // the only tile of a call of one always says Active Speaker; it must not read as someone talking
+ expect(readCall('zoom', [meeting(tile('Alex Morgan', true))]))
+ .toEqual({ speaking: [], participants: ['Alex Morgan'], me: null })
+ })
})
// ---- Google Meet in a browser: names as text in each tile, the talking tile marked by a class ----