From 3d31126c72cf220062c79973b5fa89b45ba24a15 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Wed, 18 Nov 2026 19:45:38 -0800 Subject: [PATCH] Read "from the map" only after hide, remove, turn off or clear "show me the view from the map" is a question again, not a place search. Co-authored-by: Manjunath Paparaju --- docs/CURRENT-STATE.md | 5 +++-- src/ui/omnibarIntent.js | 7 ++++--- src/ui/omnibarRows.test.mjs | 5 +++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 810afb174c..50958b0bca 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -7976,8 +7976,9 @@ the ones named, on Enter, or says no other layers are on; with a layer to keep that is not read, nothing is switched off and only Ask GEV is offered. While Space Missions is on, keeping either it or Satellites keeps both, since Space Missions draws through Satellites. "remove flights from the -map" is "remove flights", after any switch or clear verb ("clear everything -except flights from the map", "hide everything from the map"), a doubled verb ("hide hide everything") is read +map" is "remove flights", after hide, remove, turn off or clear ("clear +everything except flights from the map", "hide everything from the map"; +"show me the view from the map" is a question), a doubled verb ("hide hide everything") is read once, and a grid reference after "near" is the place ("flights near 14R PU 2090 4906"). Following needs a callsign or ICAO address (letters and a digit), a nine-digit MMSI or the name of something loaded on the map, so "Track diff --git a/src/ui/omnibarIntent.js b/src/ui/omnibarIntent.js index 2186d59bae..041650c0d3 100644 --- a/src/ui/omnibarIntent.js +++ b/src/ui/omnibarIntent.js @@ -301,10 +301,11 @@ export function normalizeLine(text, { isRequest = isPlainRequest } = {}) { .trim(); const read = polite !== line && polite && isRequest(polite) ? polite : line; // "remove flights from the map", "clear everything except ships from the - // map": the map is where every layer is. Not the verb's own "off" ("turn - // off the screen" is no layer switch). + // map": the map is where every layer is taken from. Not the verb's own + // "off" ("turn off the screen" is no layer switch), and not after "show" + // ("show me the view from the map" is a question). return read.replace( - /^((?:turn|switch) (?:on|off)|show|display|add|hide|remove|enable|disable|clear|toggle)\s+(\S.*?)\s+(?:from|off) (?:the )?(?:map|globe|screen|view)$/i, + /^((?:turn|switch) off|hide|remove|disable|clear)\s+(\S.*?)\s+(?:from|off) (?:the )?(?:map|globe|screen|view)$/i, '$1 $2', ); } diff --git a/src/ui/omnibarRows.test.mjs b/src/ui/omnibarRows.test.mjs index b023516182..542c1975b5 100644 --- a/src/ui/omnibarRows.test.mjs +++ b/src/ui/omnibarRows.test.mjs @@ -816,6 +816,11 @@ test('"except" leaves Satellites to switch off with Space Missions off', () => { ['layer(satellites,off)'], text, ); + // After "show" the ending is part of what is asked. + assert.equal( + omnibar.rows('show me the view from the map', { places: [] }).defaultIndex, + -1, + ); // The whole map cleared "from the map" is the same plan, not a place. for (const text of [ 'hide everything from the map',