feat(ui): gate the pull-request surface on GitHub, move the account into it, and GitHub sign-in into Integrations
The pull-request rail icon now appears only while GitHub is connected (OAuth or gh CLI), like Linear; Linear sits after the walkthrough in the default rail order. The GitHub account avatar and switcher leave the header for the pull-request panel, where the walkthrough, refresh, and account controls share one row and one height, and the account stays visible on the panel's empty state. A manual refresh keeps its spinner on screen long enough to read as work done. GitHub sign-in moves from Settings → Git to Settings → Integrations → Built-in integrations as a card before Linear; search and the connect buttons follow it.
This commit is contained in:
@@ -13,6 +13,7 @@ const baseOptions = {
|
||||
screenWidth: 1200,
|
||||
tabs: [],
|
||||
linearConnected: true,
|
||||
githubConnected: true,
|
||||
} as const;
|
||||
|
||||
describe('getVisibleContextRailSurfaces', () => {
|
||||
@@ -65,12 +66,16 @@ describe('getVisibleContextRailSurfaces', () => {
|
||||
expect(surfaces.slice(0, 2).map((surface) => surface.id)).toEqual(['git', 'context']);
|
||||
});
|
||||
|
||||
test('places Linear after Pull Request in the default order', () => {
|
||||
test('places Linear right after the walkthrough in the default order', () => {
|
||||
const ids = getVisibleContextRailSurfaces(baseOptions).map((surface) => surface.id);
|
||||
const pr = ids.indexOf('pr');
|
||||
const linear = ids.indexOf('linear');
|
||||
expect(pr).toBeGreaterThanOrEqual(0);
|
||||
expect(linear).toBe(pr + 1);
|
||||
const walkthrough = ids.indexOf('walkthrough');
|
||||
expect(walkthrough).toBeGreaterThanOrEqual(0);
|
||||
expect(ids.indexOf('linear')).toBe(walkthrough + 1);
|
||||
});
|
||||
|
||||
test('hides the pull request surface until GitHub is connected', () => {
|
||||
expect(getVisibleContextRailSurfaces({ ...baseOptions, githubConnected: false }).some((s) => s.id === 'pr')).toBe(false);
|
||||
expect(getVisibleContextRailSurfaces({ ...baseOptions, githubConnected: true }).some((s) => s.id === 'pr')).toBe(true);
|
||||
});
|
||||
|
||||
test('hides Linear until a workspace is connected', () => {
|
||||
|
||||
Reference in New Issue
Block a user