[verified] refactor: remove codex-pool references
This commit is contained in:
@@ -26,7 +26,7 @@ CodexDash helps you keep track of several Codex-backed OpenAI accounts without b
|
|||||||
|
|
||||||
## OpenAI/Codex login flow
|
## OpenAI/Codex login flow
|
||||||
|
|
||||||
CodexDash now reuses the public-client OAuth/PKCE shape found in [`darvell/codex-pool`](https://github.com/darvell/codex-pool), but wraps it in an app-native flow:
|
CodexDash uses an app-native OAuth/PKCE flow for connecting OpenAI accounts:
|
||||||
|
|
||||||
1. The user clicks **Connect OpenAI account**.
|
1. The user clicks **Connect OpenAI account**.
|
||||||
2. CodexDash API creates a short-lived PKCE login attempt.
|
2. CodexDash API creates a short-lived PKCE login attempt.
|
||||||
|
|||||||
@@ -570,7 +570,7 @@ export class CodexService {
|
|||||||
const headers: Record<string, string> = {
|
const headers: Record<string, string> = {
|
||||||
accept: 'application/json',
|
accept: 'application/json',
|
||||||
authorization: `Bearer ${session.accessToken}`,
|
authorization: `Bearer ${session.accessToken}`,
|
||||||
'user-agent': 'CodexDash/0.2 (+https://github.com/darvell/codex-pool)',
|
'user-agent': 'CodexDash/0.2',
|
||||||
originator: 'codex_cli_rs',
|
originator: 'codex_cli_rs',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
17
apps/api/src/codex/legacy-upstream-copy.spec.ts
Normal file
17
apps/api/src/codex/legacy-upstream-copy.spec.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import { readFileSync } from 'node:fs';
|
||||||
|
import { join } from 'node:path';
|
||||||
|
|
||||||
|
const legacyProjectName = ['codex', 'pool'].join('-');
|
||||||
|
const legacyRepoPath = ['darvell', legacyProjectName].join('/');
|
||||||
|
|
||||||
|
describe('CodexService source copy', () => {
|
||||||
|
it('does not reference the legacy upstream project in usage headers', () => {
|
||||||
|
const serviceSource = readFileSync(
|
||||||
|
join(__dirname, 'codex.service.ts'),
|
||||||
|
'utf8',
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(serviceSource).not.toContain(legacyRepoPath);
|
||||||
|
expect(serviceSource).not.toContain(legacyProjectName);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -546,8 +546,7 @@ function ConnectAccountDialog() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="rounded-2xl border border-white/10 bg-white/4 p-4 text-sm leading-6 text-slate-400">
|
<div className="rounded-2xl border border-white/10 bg-white/4 p-4 text-sm leading-6 text-slate-400">
|
||||||
CodexDash reuses the Codex public-client login shape discovered in
|
CodexDash opens the official OpenAI sign-in flow in a popup and also supports a manual pasted-URL fallback when the local callback bridge is unavailable.
|
||||||
codex-pool, but presents it as an integrated popup flow with a manual pasted-URL fallback instead of asking you to paste cookies manually.
|
|
||||||
</div>
|
</div>
|
||||||
<Button className="w-full" disabled={startMutation.isPending} type="submit">
|
<Button className="w-full" disabled={startMutation.isPending} type="submit">
|
||||||
{startMutation.isPending ? 'Preparing login…' : 'Continue to OpenAI'}
|
{startMutation.isPending ? 'Preparing login…' : 'Continue to OpenAI'}
|
||||||
|
|||||||
20
apps/web/test/legacy-upstream-copy-removal.test.js
Normal file
20
apps/web/test/legacy-upstream-copy-removal.test.js
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import { describe, expect, test } from 'bun:test';
|
||||||
|
import { readFileSync } from 'node:fs';
|
||||||
|
import { join } from 'node:path';
|
||||||
|
|
||||||
|
const appSource = readFileSync(join(import.meta.dir, '../src/App.tsx'), 'utf8');
|
||||||
|
const readmeSource = readFileSync(join(import.meta.dir, '../../../README.md'), 'utf8');
|
||||||
|
const legacyProjectName = ['codex', 'pool'].join('-');
|
||||||
|
const legacyRepoPath = ['darvell', legacyProjectName].join('/');
|
||||||
|
|
||||||
|
describe('legacy upstream copy removal', () => {
|
||||||
|
test('removes legacy upstream references from the web app copy', () => {
|
||||||
|
expect(appSource).not.toContain(legacyProjectName);
|
||||||
|
expect(appSource).not.toContain('public-client login shape discovered in');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('removes legacy upstream references from the README', () => {
|
||||||
|
expect(readmeSource).not.toContain(legacyProjectName);
|
||||||
|
expect(readmeSource).not.toContain(legacyRepoPath);
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user