Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
92a63d9
Add reviewed tracker CSV research imports
sdcarlson Sep 5, 2026
c7f3337
Run app CI and CodeQL before merging
sdcarlson Sep 5, 2026
cb9cb94
Bind CI preview with the supported hostname option
sdcarlson Sep 5, 2026
1ac5ae5
Establish protected delivery, production identity, and team workflow
sdcarlson Sep 5, 2026
7ad0146
Ignore stale workspace refreshes and clear private state on 401
cursoragent Sep 5, 2026
0d21486
Verify a fresh preview is required for every browser import
sdcarlson Sep 5, 2026
6013f17
Share session expiry so in-flight refreshes cannot restore private state
cursoragent Sep 5, 2026
aa3f2f4
Document the two-owner scope for automatic review
sdcarlson Sep 5, 2026
0a56f3f
Integrate canonical delivery and verify CSV browser handoff
sdcarlson Sep 6, 2026
ee9a952
Fix Workspace 401 parsing, stale mutations, and save-ack races
cursoragent Sep 6, 2026
427fd27
Integrate session expiry protection before tracker handoff
sdcarlson Sep 6, 2026
3980d96
Clear private workspace when tracker requests detect session expiry
sdcarlson Sep 6, 2026
9b561f7
Reconcile tracker changes with merged delivery foundation
sdcarlson Sep 6, 2026
137aea8
Run session-expiry regressions under canonical delivery checks
sdcarlson Sep 6, 2026
bddaaed
Merge remote-tracking branch 'origin/main' into codex/cleanup-csv
sdcarlson Sep 6, 2026
8faab98
Guard Workspace run continuation after session expiry
cursoragent Sep 6, 2026
1e648e3
Merge remote-tracking branch 'origin/cursor/stale-refresh-session-exp…
sdcarlson Sep 6, 2026
700dc97
Merge remote-tracking branch 'origin/main' into codex/cleanup-session
sdcarlson Sep 6, 2026
8102c81
Prevent refresh continuation from restoring expired importer state
sdcarlson Sep 6, 2026
5beb10a
Merge remote-tracking branch 'origin/cursor/stale-refresh-session-exp…
sdcarlson Sep 6, 2026
44ae98e
Merge remote-tracking branch 'origin/main' into codex/cleanup-csv
sdcarlson Sep 6, 2026
5be6058
Merge remote-tracking branch 'origin/main' into codex/cleanup-csv
sdcarlson Sep 6, 2026
05c72c2
Merge remote-tracking branch 'origin/main' into codex/cleanup-csv
sdcarlson Sep 6, 2026
e21d3e2
Await test registrations after integrating assistant handoffs
sdcarlson Sep 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ ChatGPT uses a prompt/file handoff; Codex also supports a local CLI adapter. Thi
[Integration setup](integrations/README.md) | [ChatGPT and Codex guide](integrations/OPENAI.md) | [Launch copy](LAUNCH.md)
<!-- relay:public:end -->

Tracker CSV imports are also available through explicit column mapping and preview. Source statuses remain research; existing Relay status and accepted drafts are preserved. [Tracker CSV setup](integrations/README.md#tracker-csv--relay).

[Development workflow](CONTRIBUTING.md) | [Delivery and review](docs/delivery.md) | [Team board](https://github.com/orgs/SyberLabs/projects/1)

## GrokCell bot templates
Expand Down Expand Up @@ -75,6 +77,16 @@ Open the local URL printed by the server. Local sign-in is simulated by the Site

The connectors are runnable local commands with file import/export in the app. Notion and Claude require your own credentials. A local assisted trial retrieved real Notion records read-only through the connected Notion tool; that does not validate the standalone Notion command connector. Claude live access has not been tested. Grok Bot uses a documented command/file adapter, not an assumed proprietary API. Bot JSON was transcribed by hand into a validated file and loaded in the browser; fully automatic Bot file transfer is not validated. Browser acceptance, reload, and reimport kept the accepted draft, Ready status, two observations (deduplicated), and review history. There is no automatic background sync, autonomous hunting, application sending, or LinkedIn messaging. Generated claims still require your review. Production deployment has not been validated. This validates a local assisted workflow, not independent user adoption or unattended production.

## Where Relay fits with existing tools

Use your preferred discovery and application tools alongside Relay. [Simplify](https://simplify.jobs/) already offers job matching, autofill, resume tailoring, and tracking. Its [Gmail integration](https://help.simplify.jobs/articles/0236686-email-integration) also includes reviewed AI emails and suggested status changes. Relay's focus is preserving research and exact draft decisions across tool handoffs.

**First compatibility path: tracker CSV → Relay preview.** Simplify documents [CSV import and export](https://help.simplify.jobs/en/articles/2140179-using-the-job-tracker). In Relay, open **Import a tracker CSV**, choose your file, confirm the company, role and employer posting URL columns, and preview before saving. Optional status and notes columns are preserved as research. Every new job starts Held; source statuses never approve a draft or synchronize the application pipeline. Other columns are explicitly listed as omitted.

This is a file importer, not a Simplify account connection or partnership. CSV handling is tested with fictional fixtures and a Chromium journey covering column selection, preview, import, acceptance, repeat import and reload; a real Simplify export has not yet been validated. Files need posting URLs, comma-separated columns and at most 200 opportunity rows. See the [CSV setup guide](integrations/README.md#tracker-csv--relay) and [fictional example](tests/fixtures/tracker-example.csv).

Huntr and Teal export compatibility are further candidates, after the first handoff proves useful. Current working integrations and their verification limits are documented in the [setup guide](integrations/README.md). Market positioning was reviewed against vendor documentation on September 5, 2026; repeat use and willingness to pay remain unvalidated.

## Checks

```sh
Expand Down
6 changes: 6 additions & 0 deletions app/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ export default function About() {
application status.
</p>
<h2>What’s available today</h2>
<p>
Bring a tracker CSV into Relay: match the company, role and posting URL
columns, preview the records, then import them as research. Original
statuses remain in the notes; existing Relay status and accepted drafts
are preserved. No tracker account connection is required.
</p>
<p>
A working review workspace, duplicate detection, source history, and
local command integrations. Obsidian notes can be selected for import,
Expand Down
32 changes: 32 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -704,3 +704,35 @@ footer {
max-width: 100%;
margin-top: 0.5rem;
}

.tracker-fields {
border: 0;
padding: 0;
min-width: 0;
}
.tracker-columns {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 12px;
}
.tracker-fields input:not([type='file']),
.tracker-fields select {
display: block;
width: 100%;
padding: 10px;
border: 1px solid var(--line);
border-radius: 6px;
background: var(--paper);
color: inherit;
font: inherit;
}
.tracker-preview {
max-height: 440px;
overflow: auto;
margin-bottom: 16px;
}
.tracker-preview p,
.tracker-preview pre {
overflow-wrap: anywhere;
white-space: pre-wrap;
}
233 changes: 233 additions & 0 deletions app/tracker-import.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
'use client';
import { useRef, useState } from 'react';
import {
readTrackerCsv,
suggestTrackerMapping,
trackerRows,
type TrackerCsv,
type TrackerMapping,
} from '../lib/tracker-csv';
import type { SourceRow } from '../lib/domain';

const fields = [
['company', 'Company'],
['role', 'Role'],
['url', 'Employer posting URL'],
['status', 'Source status (optional)'],
['notes', 'Research notes (optional)'],
] as const;
type Preview = { rows: SourceRow[]; kinds: string[] };

export function TrackerImport({
onImported,
onUnauthorized,
}: {
onImported: () => Promise<void>;
onUnauthorized: () => void;
}) {
const [csv, setCsv] = useState<TrackerCsv | null>(null);
const [mapping, setMapping] = useState<TrackerMapping>({
company: '',
role: '',
url: '',
status: '',
notes: '',
});
const [source, setSource] = useState('Simplify');
const [preview, setPreview] = useState<Preview | null>(null);
const [message, setMessage] = useState('');
const [busy, setBusy] = useState(false);
const reading = useRef(0);

async function submit(action: 'preview' | 'import') {
if (!csv) return;
setBusy(true);
setMessage('');
try {
const rows =
action === 'import' ? preview?.rows : trackerRows(csv, mapping, source);
if (!rows) throw Error('Preview the selected columns first.');
if (action === 'preview') setPreview(null);
const response = await fetch('/api/workspace', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ action, rows }),
});
if (response.status === 401) {
onUnauthorized();
return;
}
const result = (await response.json()) as {
error?: string;
items: { kind: string }[];
};
if (!response.ok)
throw Error(result.error || 'Unable to import research.');
if (action === 'preview') {
setPreview({
rows,
kinds: result.items.map((item: { kind: string }) => item.kind),
});
setMessage('Check every record below. Nothing has been saved.');
} else {
setPreview(null);
setCsv(null);
setMessage(
`Imported ${rows.length} research records. Existing application status and draft approval were preserved.`,
);
try {
await onImported();
} catch {
setMessage(
'Research was imported, but the workspace could not refresh. Reload the page to see it.',
);
}
}
} catch (error) {
setMessage(
error instanceof Error ? error.message : 'Unable to read the tracker.',
);
} finally {
setBusy(false);
}
}

return (
<details className="import">
<summary>
<b>Import a tracker CSV</b>
</summary>
<p>
Bring selected opportunities from a Simplify export or another tracker.
Match its columns, then review the records before saving. New jobs enter
the review queue; existing status and accepted drafts stay in Relay.
</p>
<p>
Source statuses, including offers and rejections, are kept as research
only. This does not synchronize your application pipeline. Choose up to
200 rows with employer posting URLs; add missing URLs to your file
first.
</p>
<fieldset disabled={busy} className="tracker-fields">
<label className="field">
Source tracker
<input
value={source}
maxLength={100}
onChange={(e) => {
setSource(e.target.value);
setPreview(null);
}}
/>
</label>
<label className="field">
Choose tracker CSV
<input
type="file"
accept=".csv,text/csv"
onChange={async (e) => {
const input = e.currentTarget;
const file = input.files?.[0];
input.value = '';
if (!file) return;
const request = ++reading.current;
setPreview(null);
setCsv(null);
setMessage('Reading selected file…');
try {
if (file.size > 2000000)
throw Error('Choose a CSV smaller than 2 MB.');
const text = await file.text();
if (request !== reading.current) return;
const parsed = readTrackerCsv(text);
setCsv(parsed);
setMapping(suggestTrackerMapping(parsed.headers));
setMessage(
`Read ${parsed.records.length} rows locally. Confirm the column choices. Only mapped fields are sent when you preview.`,
);
} catch (error) {
if (request === reading.current)
setMessage(
error instanceof Error
? error.message
: 'Unable to read CSV.',
);
}
}}
/>
</label>
{csv && (
<>
<div className="tracker-columns">
{fields.map(([key, label]) => (
<label className="field" key={key}>
{label}
<select
value={mapping[key]}
onChange={(e) => {
setMapping({ ...mapping, [key]: e.target.value });
setPreview(null);
}}
>
<option value="">
{key === 'status' || key === 'notes'
? 'Do not import'
: 'Choose column'}
</option>
{csv.headers.map((header) => (
<option key={header} value={header}>
{header}
</option>
))}
</select>
</label>
))}
</div>
<p>
Omitted columns:{' '}
{csv.headers
.filter((h) => !Object.values(mapping).includes(h))
.join(', ') || 'none'}
. Keep your original export for all other data.
</p>
<button
type="button"
className="secondary"
onClick={() => void submit('preview')}
>
Preview tracker records
</button>
</>
)}
</fieldset>
{message && <output>{message}</output>}
{preview && (
<>
<h3>Review {preview.rows.length} records</h3>
<p>
These are the exact research fields that will be saved. Existing
matches may change before import; Relay rechecks them when saving.
</p>
<div className="tracker-preview">
{preview.rows.map((row, index) => (
<article className="source" key={index}>
<b>{row.Name}</b>{' '}
<span className="badge">{preview.kinds[index]}</span>
<p>{row.Job}</p>
<pre>{row.Notes}</pre>
</article>
))}
</div>
<button
type="button"
className="primary"
disabled={busy}
onClick={() => void submit('import')}
>
Import {preview.rows.length} research records
</button>
</>
)}
</details>
);
}
18 changes: 16 additions & 2 deletions app/workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { validateRows } from '../lib/domain';
import Link from 'next/link';
import { useRelayTools } from './agent-tools';
import { Connections } from './connections';

import { TrackerImport } from './tracker-import';
import {
applyLoadedDraft,
canSave,
Expand All @@ -19,6 +19,7 @@ import {
createWorkspaceSession,
editorForJobs,
expiredPrivateWorkspace,
expireSession,
mutationIsLive,
processMutation,
processRefresh,
Expand Down Expand Up @@ -85,6 +86,7 @@ export default function Workspace() {
[previewedImport, setPreviewedImport] = useState(''),
[showImport, setShowImport] = useState(false);
const sessionRef = useRef(createWorkspaceSession());
const workspaceEpoch = sessionRef.current.gate.epoch;
const applyExpired = useCallback(() => {
const next = expiredPrivateWorkspace();
setJobs(next.jobs);
Expand Down Expand Up @@ -351,7 +353,19 @@ export default function Workspace() {
) : !loaded ? (
<p aria-live="polite">Opening your workspace…</p>
) : null}

{!signedOut && loaded && (
<TrackerImport
onImported={() =>
mutationIsLive(sessionRef.current.gate, { epoch: workspaceEpoch })
? refresh()
: Promise.resolve()
}
onUnauthorized={() => {
expireSession(sessionRef.current);
applyExpired();
}}
/>
)}
{!signedOut && (
<Connections
current={
Expand Down
14 changes: 14 additions & 0 deletions integrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

Relay uses local commands and explicit file handoffs. You choose which data leaves your workspace. The command tool works in a Grok Bot VM, Claude Code terminal, or a normal shell. It needs Node 24; it does not require a hosted Relay API token.

## Tracker CSV → Relay

Use **Import a tracker CSV** in the workspace for a user-managed Simplify export or another comma-separated tracker file. This path needs no account connection or credentials.

1. Export only the opportunities you want to review, or prepare a copy containing those rows. Keep the original export.
2. Choose the file and name the source tracker. Confirm the company, role and employer posting URL columns. Relay suggests recognizable headers but requires you to review them. Map source status and research notes if wanted; all omitted columns are listed.
3. Choose **Preview tracker records**. The file is read locally; only the mapped fields are sent to your Relay workspace for the match preview. Review each title, URL, source status and note. Preview does not save records.
4. Choose **Import … research records** to save the previewed data. Matching URLs add source history to existing jobs. New jobs start Held; existing status, draft and acceptance remain in Relay. The server rechecks matches at import time.

Source status is recorded in the observation's notes. An Applied, Interview, Offer, Rejected, Withdrawn or Ready value never changes Relay status. This is research import, not full pipeline migration or two-way synchronization. Changing a source status creates a new observation; repeating unchanged research does not duplicate it. Keep the source tracker name consistent across exports for stable observation identity. Renaming the source creates a separate source identity. Different roles sharing a company/title are not merged on those names; use the original employer posting URL to match across tools. URLs on different job boards may remain separate.

Files must be UTF-8, comma-separated, smaller than 2 MB, with one unique header row and 1–200 opportunity rows. Quoted commas, escaped quotes and multiline notes are supported. The limit is 50 columns, 500 characters for the combined company/role title and 20,000 for the resulting research including its source label/status. Blank lines are ignored. Missing posting URLs, duplicate headers, malformed rows and oversized values reject the batch with an error; no partial import occurs. Add missing employer URLs to your copy before trying again.

Try [the fictional CSV](../tests/fixtures/tracker-example.csv). These sample headers are a Relay test fixture, not a captured Simplify export. The [Simplify tracker guide](https://help.simplify.jobs/en/articles/2140179-using-the-job-tracker) documents CSV export; compatibility with an actual account export remains unverified. This release claims no Simplify partnership, API access, account sync or application sending.
## ChatGPT and Codex to Relay

Use **Prepare for ChatGPT** or **Prepare for Codex** in the connection panel, then return the assistant's JSON response for review. Codex also supports `codex-run` through your signed-in CLI. [Read the complete ChatGPT and Codex guide](OPENAI.md) for commands, setup and data boundaries. These are explicit handoffs, not an installed hosted ChatGPT app.
Expand Down
Loading
Loading