Skip to content

Commit 66e7634

Browse files
committed
improvement(links): open go/ links alongside sim/ and call the page Links
1 parent e5b4e3f commit 66e7634

28 files changed

Lines changed: 92 additions & 72 deletions

File tree

‎apps/docs/content/docs/browser-extension/index.mdx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Sim browser extension
3-
description: Ask Sim about the page you’re reading, share a screenshot, and open your team’s Sim Links from Chrome.
3+
description: Ask Sim about the page you’re reading, share a screenshot, and open your team’s go/ links from Chrome.
44
---
55

66
[Install Sim for Chrome](https://chromewebstore.google.com/detail/sim/oanlcahddodnjpdoopcpjlcageejjpmg) to ask questions about a page without leaving it. Open Chrome’s **Extensions** menu and pin **Sim** to keep it one click away.
@@ -27,9 +27,9 @@ If Chrome needs access to a new tab, the sidebar shows the shortcut assigned in
2727

2828
Share the chat extension’s install link with your team. In managed Chrome, an admin can [allow the extension for an organizational unit](https://support.google.com/chrome/a/answer/6306504) so people can install it themselves.
2929

30-
If your organization has [Sim Links](/search/sim-links), type `sim`, press **Space**, and enter part of a link name for suggestions. To open a shortcut by typing it directly, include the trailing slash, as in `sim/handbook/`. Teams that already use an internal host named `sim` should keep that hostname conflict in mind: the chat extension routes those navigations to Sim.
30+
If your organization has [Links](/search/sim-links), type `sim`, press **Space**, and enter part of a link name for suggestions. To open a shortcut by typing it directly, include the trailing slash, as in `go/handbook/` or `sim/handbook/`. Teams that already use an internal host named `go` or `sim`, or another go-links extension, should keep that conflict in mind: the extension routes those navigations to Sim, and when two extensions redirect the same address, Chrome uses the most recently installed one.
3131

32-
In version 0.1.3 or later, **+ → Browser shortcuts** can recover explicit `sim/handbook` searches on Google, Bing, DuckDuckGo, and Yahoo. Enable your provider and approve the site access shown by Chrome. This leaves ordinary searches and your default search engine unchanged. See [shortcut setup and supported inputs](/search/sim-links#open-links-from-the-address-bar).
32+
In version 0.1.3 or later, **+ → Browser shortcuts** can recover explicit `go/handbook` and `sim/handbook` searches on Google, Bing, DuckDuckGo, and Yahoo. Enable your provider and approve the site access shown by Chrome. This leaves ordinary searches and your default search engine unchanged. See [shortcut setup and supported inputs](/search/sim-links#open-links-from-the-address-bar).
3333

3434
## Page access and privacy
3535

‎apps/docs/content/docs/search/sim-links.mdx‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: Sim Links
3-
description: Short sim/ links that take everyone in your organization to the right page
2+
title: Links
3+
description: Short go/ and sim/ links that take everyone in your organization to the right page
44
---
55

6-
Sim Links are short names for pages your team opens often, like `sim/handbook` or `sim/okta`. Every member of your organization can use them, with or without a Search seat.
6+
Links are short names for pages your team opens often, like `sim/handbook` or `sim/okta`. With Sim for Chrome, `go/handbook` opens the same link, so the go/ habit from other companies works too. Every member of your organization can use them, with or without a Search seat.
77

8-
Open **Sim Links** in the organization sidebar to see your organization's links. Search by name, destination, or description, or use **Sort → Opens** to see the 50 most opened links.
8+
Open **Links** in the organization sidebar to see your organization's links. Search by name, destination, or description, or use **Sort → Opens** to see the 50 most opened links.
99

1010
## Open a link
1111

@@ -15,13 +15,13 @@ Names ignore case and punctuation, so `sim/Team-Handbook` and `sim/teamhandbook`
1515

1616
## Open links from the address bar
1717

18-
In Sim Cloud, open **Sim Links → Browser shortcuts** to install [Sim for Chrome](https://chromewebstore.google.com/detail/sim/oanlcahddodnjpdoopcpjlcageejjpmg) in your work profile. Type `sim` in Chrome’s address bar, press **Space**, and enter part of a link name. Chrome shows matching links, most opened first. Unlisted links can still open by name.
18+
In Sim Cloud, open **Links → Browser shortcuts** to install [Sim for Chrome](https://chromewebstore.google.com/detail/sim/oanlcahddodnjpdoopcpjlcageejjpmg) in your work profile. Type `sim` in Chrome’s address bar, press **Space**, and enter part of a link name. Chrome shows matching links, most opened first. Unlisted links can still open by name.
1919

20-
To open links as `sim/handbook`, select **Enable sim/ shortcuts** in that dialog once, using the Chrome profile where Sim is installed. This opens your Sim Links directory in a new tab and lets Chrome remember the short host in that profile. If Chrome still sends a shortcut to search, enter `http://sim/handbook` or `sim/handbook/` with a trailing slash. Use **Copy link** in Sim to share an address that also works without the extension.
20+
To open links as `go/handbook` or `sim/handbook`, select **Enable go/ shortcuts** and **Enable sim/ shortcuts** in that dialog once each, using the Chrome profile where Sim is installed. Each opens your Links directory in a new tab and lets Chrome remember the short host in that profile. If Chrome still sends a shortcut to search, enter `http://sim/handbook` or `sim/handbook/` with a trailing slash. Use **Copy link** in Sim to share an address that also works without the extension.
2121

2222
In Sim for Chrome 0.1.3 or later, open the extension sidebar’s **+ → Browser shortcuts** and enable your search provider to recover `sim/handbook` when Chrome treats it as a search. Approve access to the exact sites shown. This is optional and supports Google (`google.com`), Bing, DuckDuckGo, and Yahoo. Sim remembers the choice in this Chrome profile. Ordinary searches still use your search engine; its default is unchanged.
2323

24-
Recovery matches a whole `sim/<name>` shortcut, including simple slash-separated values such as `sim/jira/123`. For values containing spaces, query parameters, unsupported search domains, or a managed browser that blocks site access, use `sim` + **Space** or the full `https://www.sim.ai/sim/<name>` address. Turn recovery off in **Browser shortcuts**; this keeps the site permission, which you can remove through **Site access** or Chrome’s extension settings.
24+
Recovery matches a whole `go/<name>` or `sim/<name>` shortcut, including simple slash-separated values such as `go/jira/123`. For values containing spaces, query parameters, unsupported search domains, or a managed browser that blocks site access, use `sim` + **Space** or the full `https://www.sim.ai/sim/<name>` address. Turn recovery off in **Browser shortcuts**; this keeps the site permission, which you can remove through **Site access** or Chrome’s extension settings.
2525

2626
If `sim` + **Space** sends link names to your search engine even when the address bar shows **Sim**, a Chrome site search may already use the `sim` shortcut. Enter `http://sim/handbook` to open the link directly. To restore suggestions, temporarily turn off the Sim extension, rename the old shortcut in `chrome://settings/searchEngines`, then turn Sim back on. If your organization manages the shortcut, ask your administrator to rename it.
2727

‎apps/extension/DESIGN.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ other workspace resources or browser-control tools.
5555

5656
- Required browser capabilities: side panel, scripting, active tab, context menus,
5757
and short-lived session storage for selection handoff. Required host access is
58-
limited to the configured Sim origin and to `http(s)://sim/*`, which exists only so
59-
one static redirect rule can send top-level navigations to that host to the Sim link resolver.
58+
limited to the configured Sim origin and to `http(s)://sim/*` and `http(s)://go/*`, which exist
59+
only so one static redirect rule can send top-level navigations to those hosts to the link resolver.
6060
- Other HTTP(S) origins are optional grants requested for the current site from a
6161
user gesture. Each grant can be revoked. Keeping the panel open is not a grant
6262
to read every subsequently selected tab.
6363
- No history, bookmarks, cookie API, debugger, native messaging, external messaging,
6464
or arbitrary remote code execution. The only network interception is the static
65-
`sim/` redirect rule above.
65+
`sim/` and `go/` redirect rule above, plus opt-in search recovery.
6666
- The only background network request is the `sim` address-bar keyword: after
6767
`sim` and Space, the text typed before the first `/` or `?` is sent to the
6868
configured Sim origin with the signed-in session to suggest matching Sim links,

‎apps/extension/README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Chrome extension attaches an explicitly captured page or selection to the ex
44

55
[User and administrator guide](https://docs.sim.ai/browser-extension)
66

7-
The keyboard shortcut prefers highlighted text and preserves the draft when a selection cannot be read. Chrome’s **Extensions → Keyboard shortcuts** page controls the binding per profile. A link’s context menu opens the existing Sim Links creation form with a reviewed destination; only selecting **Create** writes a link.
7+
The keyboard shortcut prefers highlighted text and preserves the draft when a selection cannot be read. Chrome’s **Extensions → Keyboard shortcuts** page controls the binding per profile. A link’s context menu opens the existing Links creation form with a reviewed destination; only selecting **Create** writes a link.
88

99
## Build and load
1010

@@ -29,10 +29,10 @@ SIM_EXTENSION_DEV=1 SIM_EXTENSION_ORIGIN=http://localhost:3000 bun run --cwd app
2929

3030
## Data and permissions
3131

32-
- Required capabilities: `activeTab`, `scripting`, `sidePanel`, `storage`, `contextMenus`, `declarativeNetRequestWithHostAccess`, and access to the configured Sim origin and to `http(s)://sim/*`.
33-
- Type `sim`, press Space, enter the name, and press Enter to open an organization's [Sim link](https://docs.sim.ai/search/sim-links). Chrome can treat bare `sim/<name>` as a search before the redirect rule runs. Typing `http://sim/<name>` once lets Chrome learn the short host in that profile. A trailing slash (`sim/<name>/`) also selects navigation without relying on that history. A single static redirect rule rewrites top-level navigations to `http(s)://sim/*` to `<Sim origin>/sim/*` with the path and query unchanged. The `sim` host permission exists only for that rule: every navigation to that host is redirected before it loads, and no other request is matched or observed. An organization that already serves an intranet host named `sim` should not install this build, since its links would be redirected to Sim.
32+
- Required capabilities: `activeTab`, `scripting`, `sidePanel`, `storage`, `contextMenus`, `declarativeNetRequestWithHostAccess`, and access to the configured Sim origin and to `http(s)://sim/*` and `http(s)://go/*`.
33+
- Type `sim`, press Space, enter the name, and press Enter to open an organization's [Sim link](https://docs.sim.ai/search/sim-links). `go/<name>` opens the same link, for people used to go links elsewhere. Chrome can treat bare `go/<name>` or `sim/<name>` as a search before the redirect rule runs. Typing `http://go/<name>` once lets Chrome learn the short host in that profile. A trailing slash (`go/<name>/`) also selects navigation without relying on that history. A single static redirect rule rewrites top-level navigations to `http(s)://sim/*` and `http(s)://go/*` to `<Sim origin>/sim/*` with the path and query unchanged. The `sim` and `go` host permissions exist only for that rule: every navigation to those hosts is redirected before it loads, and no other request is matched or observed. An organization that already serves an intranet host named `sim` or `go` should not install this build, since its links would be redirected to Sim. When another extension (such as another go-links tool) also redirects `go/`, Chrome applies the most recently installed extension's rule.
3434
- The `sim` address-bar keyword (`sim`, then Space) lists matching Sim links while you type and opens what you enter through the same resolver. For these suggestions, the background worker sends the text typed before the first `/` or `?`, and nothing else, unless that text contains a space (a search) or is longer than a link name can be, to `<Sim origin>/api/sim-links/suggestions` with the signed-in session, and the extension's content security policy allows connections to that origin alone. Unlisted links are never suggested.
35-
- **+ → Browser shortcuts** separately opts into recovery for exact Google, Bing, DuckDuckGo, or Yahoo HTTPS search hosts. After a direct Chrome permission grant, dynamic request rules redirect only top-level GET requests with one query parameter containing a whole `sim/<name>` shortcut. Only that value reaches `/sim-links/recover`, which validates it and redirects to the existing authenticated resolver. Ordinary search terms, additional search parameters, subframes, and unsupported inputs are not forwarded. Chrome applies these rules without an extension search-URL observer. Turning a provider off removes its rules while preserving site access; revoking access clears its recovery choice. This does not enable page reference or change the default search provider.
35+
- **+ → Browser shortcuts** separately opts into recovery for exact Google, Bing, DuckDuckGo, or Yahoo HTTPS search hosts. After a direct Chrome permission grant, dynamic request rules redirect only top-level GET requests with one query parameter containing a whole `go/<name>` or `sim/<name>` shortcut. Only that value reaches `/sim-links/recover`, which validates it and redirects to the existing authenticated resolver. Ordinary search terms, additional search parameters, subframes, and unsupported inputs are not forwarded. Chrome applies these rules without an extension search-URL observer. Turning a provider off removes its rules while preserving site access; revoking access clears its recovery choice. This does not enable page reference or change the default search provider.
3636
- Optional HTTP/HTTPS site access is requested only by a menu action naming that site. Chrome's `activeTab` access is temporary and does not follow arbitrary new sites.
3737
- Page capture runs on demand in Chrome's isolated world. It excludes editable fields, inputs, hidden elements, scripts, and embedded documents. It reads only the top frame. PDF viewers and canvas documents may have no accessible text.
3838
- Extraction stops at 50,000 text characters, 150,000 serialized UTF-8 bytes, 15,000 visited nodes, or 150ms. The composer exposes truncation.

‎apps/extension/scripts/build.ts‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,16 @@ for (const [size, file] of [
9090
await cp(resolve(root, '../sim/public/favicon', file), resolve(dist, `icon-${size}.png`))
9191
}
9292
/**
93-
* Only requests to the short host reach this rule. Chrome can classify bare `sim/<name>` as a
94-
* search before navigation. Preserve the path and query for actual short-host navigations.
93+
* Only requests to the short hosts reach this rule: `go/` is the habit people bring from other
94+
* companies, `sim/` our own. Chrome can classify a bare `go/<name>` as a search before navigation.
95+
* Preserve the path and query for actual short-host navigations.
9596
*/
9697
const simLinkRules = [
9798
{
9899
id: 1,
99100
priority: 1,
100101
action: { type: 'redirect', redirect: { regexSubstitution: `${origin.origin}/sim/\\1` } },
101-
condition: { regexFilter: '^https?://sim/(.*)$', resourceTypes: ['main_frame'] },
102+
condition: { regexFilter: '^https?://(?:sim|go)/(.*)$', resourceTypes: ['main_frame'] },
102103
},
103104
]
104105
await writeFile(resolve(dist, 'sim-links.json'), JSON.stringify(simLinkRules, null, 2))
@@ -110,7 +111,7 @@ await writeFile(
110111
name: development ? 'Sim (Development)' : 'Sim',
111112
version: packageJson.version,
112113
description:
113-
"Ask Sim about the page you are reading, and open your organization's sim/ links from the address bar.",
114+
"Ask Sim about the page you are reading, and open your organization's go/ links from the address bar.",
114115
minimum_chrome_version: '120',
115116
permissions: [
116117
'activeTab',
@@ -120,7 +121,13 @@ await writeFile(
120121
'contextMenus',
121122
'declarativeNetRequestWithHostAccess',
122123
],
123-
host_permissions: [`${origin.origin}/*`, 'http://sim/*', 'https://sim/*'],
124+
host_permissions: [
125+
`${origin.origin}/*`,
126+
'http://sim/*',
127+
'https://sim/*',
128+
'http://go/*',
129+
'https://go/*',
130+
],
124131
declarative_net_request: {
125132
rule_resources: [{ id: 'sim_links', enabled: true, path: 'sim-links.json' }],
126133
},

‎apps/extension/scripts/test-e2e.ts‎

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,18 +360,23 @@ try {
360360
}
361361

362362
await check(
363-
'HTTP and HTTPS navigations to the sim host reach the configured resolver',
363+
'HTTP and HTTPS navigations to the sim and go hosts reach the configured resolver',
364364
async () => {
365365
const tab = await page.context().newPage()
366-
for (const scheme of ['http', 'https']) {
366+
for (const [scheme, host] of [
367+
['http', 'sim'],
368+
['https', 'sim'],
369+
['http', 'go'],
370+
['https', 'go'],
371+
]) {
367372
for (const path of [
368373
'handbook',
369374
'handbook/',
370375
'jira/123?view=board',
371376
'jira/a%2Fb?view=board%20view',
372377
]) {
373-
await tab.goto(`${scheme}://sim/${path}`)
374-
assert(tab.url() === `${origin}/sim/${path}`, `sim/${path} reached ${tab.url()}`)
378+
await tab.goto(`${scheme}://${host}/${path}`)
379+
assert(tab.url() === `${origin}/sim/${path}`, `${host}/${path} reached ${tab.url()}`)
375380
}
376381
}
377382
await tab.close()
@@ -1434,7 +1439,12 @@ try {
14341439
await unchanged(url)
14351440
await toggle(provider.id, true)
14361441
for (const host of provider.hosts) {
1437-
for (const shortcut of ['sim%2Faskit', 'sim/jira/ABC-123']) {
1442+
for (const shortcut of [
1443+
'sim%2Faskit',
1444+
'sim/jira/ABC-123',
1445+
'go%2Faskit',
1446+
'go/jira/ABC-123',
1447+
]) {
14381448
const candidate = `https://${host}${provider.path}?client=chrome&${provider.parameter}=${shortcut}&source=qa`
14391449
const prior = searchRequests.filter((request) => request.url === candidate).length
14401450
await tab.goto(candidate)

‎apps/extension/src/background.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async function configure() {
2929
})
3030
chrome.contextMenus.create({
3131
id: LINK_MENU,
32-
title: 'Create Sim Link',
32+
title: 'Create link in Sim',
3333
contexts: ['link'],
3434
documentUrlPatterns: ['http://*/*', 'https://*/*'],
3535
targetUrlPatterns: ['http://*/*', 'https://*/*'],

‎apps/extension/src/omnibox.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const logger = createLogger('BrowserExtensionOmnibox')
1212

1313
/** Longer than the gap between a typist's keystrokes, so a name is looked up once it settles. */
1414
const SUGGEST_DELAY_MS = 220
15-
const SEARCH_HINT = 'Find a Sim link'
15+
const SEARCH_HINT = 'Find a link in Sim'
1616
// Chrome persists this template and substitutes the input when rendering the default row.
1717
const OPEN_LINK_HINT = 'Open <match>%s</match> in Sim'
1818

@@ -24,14 +24,14 @@ interface SuggestedLink {
2424

2525
/**
2626
* What was typed after the `sim` keyword, split where the name ends: `sim/jira/ABC-1?tab=all`
27-
* (the `sim/` is optional) has the name `jira` and the rest `/ABC-1?tab=all`. Surrounding spaces,
27+
* (a `sim/` or `go/` prefix is optional) has the name `jira` and the rest `/ABC-1?tab=all`. Surrounding spaces,
2828
* the prefix, leading slashes, and any `#fragment` are dropped, as the address bar would; values
2929
* and the query otherwise stay exactly as typed.
3030
*/
3131
function readTyped(text: string): { name: string; rest: string } {
3232
const typed = text
3333
.trim()
34-
.replace(/^sim\//i, '')
34+
.replace(/^(?:sim|go)\//i, '')
3535
.replace(/^\/+/, '')
3636
.replace(/#.*$/, '')
3737
const nameEnd = typed.search(/[/?]/)

0 commit comments

Comments
 (0)