Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
590 changes: 186 additions & 404 deletions src/commands.ts

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export const enum Commands {
ShowIssueForSiteIdAndKey = 'atlascode.jira.showIssueForSiteIdAndKey',
ShowIssueForURL = 'atlascode.jira.showIssueForURL',
ShowConfigPage = 'atlascode.showConfigPage',
ShowConfigPageV3 = 'atlascode.showConfigPageV3',
ShowConfigPageFromExtensionContext = 'atlascode.extensionContext.showConfigPage',
ShowJiraAuth = 'atlascode.showJiraAuth',
ShowBitbucketAuth = 'atlascode.showBitbucketAuth',
Expand Down Expand Up @@ -93,7 +92,6 @@ export const enum Commands {
OpenRovoDevConfig = 'atlascode.openRovoDevConfig',
OpenRovoDevMcpJson = 'atlascode.openRovoDevMcpJson',
OpenRovoDevGlobalMemory = 'atlascode.openRovoDevGlobalMemory',
OpenNativeSettings = 'atlascode.openNativeSettings',
QuickAuth = 'atlascode.rovodev.quickAuth',
JiraLogin = 'atlascode.jira.login',
JiraAPITokenLogin = 'atlascode.jira.apiTokenLogin',
Expand Down
25 changes: 5 additions & 20 deletions src/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { PipelineSummaryAction } from './lib/ipc/fromUI/pipelineSummary';
import { PullRequestDetailsAction } from './lib/ipc/fromUI/pullRequestDetails';
import { StartWorkAction } from './lib/ipc/fromUI/startWork';
import { ConfigTarget } from './lib/ipc/models/config';
import { SectionChangeMessage, SectionV3ChangeMessage } from './lib/ipc/toUI/config';
import { SectionChangeMessage } from './lib/ipc/toUI/config';
import { StartWorkIssueMessage } from './lib/ipc/toUI/startWork';
import { CommonActionMessageHandler } from './lib/webview/controller/common/commonActionMessageHandler';
import { Logger } from './logger';
Expand All @@ -40,7 +40,7 @@ import { RovoDevProcessManager } from './rovo-dev/rovoDevProcessManager';
import { RovoDevWebviewProvider } from './rovo-dev/rovoDevWebviewProvider';
import { SiteManager } from './siteManager';
import { AtlascodeUriHandler, SETTINGS_URL } from './uriHandler';
import { Experiments, FeatureFlagClient, FeatureFlagClientInitError, Features } from './util/featureFlags';
import { FeatureFlagClient, FeatureFlagClientInitError, Features } from './util/featureFlags';
import { AuthStatusBar } from './views/authStatusBar';
import { HelpExplorer } from './views/HelpExplorer';
import { JiraActiveIssueStatusBar } from './views/jira/activeIssueStatusBar';
Expand All @@ -52,7 +52,6 @@ import { PipelinesExplorer } from './views/pipelines/PipelinesExplorer';
import { VSCAnalyticsApi } from './vscAnalyticsApi';
import { VSCCommonMessageHandler } from './webview/common/vscCommonMessageActionHandler';
import { VSCConfigActionApi } from './webview/config/vscConfigActionApi';
import { VSCConfigV3WebviewControllerFactory } from './webview/config/vscConfigV3WebviewControllerFactory';
import { VSCConfigWebviewControllerFactory } from './webview/config/vscConfigWebviewControllerFactory';
import { ExplorerFocusManager } from './webview/ExplorerFocusManager';
import { MultiWebview } from './webview/multiViewFactory';
Expand Down Expand Up @@ -136,17 +135,6 @@ export class Container {
this._analyticsApi,
);

const settingsV3ViewFactory = new SingleWebview<SectionV3ChangeMessage, ConfigAction>(
context.extensionPath,
new VSCConfigV3WebviewControllerFactory(
new VSCConfigActionApi(this._analyticsApi, this._cancellationManager),
this._commonMessageHandler,
this._analyticsApi,
SETTINGS_URL,
),
this._analyticsApi,
);

const startWorkV2ViewFactory = new SingleWebview<StartWorkIssueMessage, StartWorkAction>(
context.extensionPath,
new VSCStartWorkWebviewControllerFactory(
Expand Down Expand Up @@ -214,11 +202,8 @@ export class Container {
this.analyticsClient.sendTrackEvent(e);
});
}
if (this._featureFlagClient.checkExperimentValue(Experiments.AtlascodeNewSettingsExperiment)) {
context.subscriptions.push((this._settingsWebviewFactory = settingsV3ViewFactory));
} else {
context.subscriptions.push((this._settingsWebviewFactory = settingsV2ViewFactory));
}

context.subscriptions.push((this._settingsWebviewFactory = settingsV2ViewFactory));

if (this._featureFlagClient.checkGate(Features.UseNewAuthFlow)) {
setCommandContext(CommandContext.UseNewAuthFlow, true);
Expand Down Expand Up @@ -527,7 +512,7 @@ export class Container {
return this._explorerFocusManager;
}

private static _settingsWebviewFactory: SingleWebview<SectionChangeMessage | SectionV3ChangeMessage, ConfigAction>;
private static _settingsWebviewFactory: SingleWebview<SectionChangeMessage, ConfigAction>;
public static get settingsWebviewFactory() {
return this._settingsWebviewFactory;
}
Expand Down
2 changes: 0 additions & 2 deletions src/lib/ipc/fromUI/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export enum ConfigActionType {
ViewJiraIssue = 'viewJiraIssue',
CreatePullRequest = 'createPullRequest',
ViewPullRequest = 'viewPullRequest',
OpenNativeSettings = 'openNativeSettings',
StartAuthFlow = 'StartAuthFlow',
}

Expand All @@ -38,7 +37,6 @@ export type ConfigAction =
| ReducerAction<ConfigActionType.ViewJiraIssue>
| ReducerAction<ConfigActionType.CreatePullRequest>
| ReducerAction<ConfigActionType.ViewPullRequest>
| ReducerAction<ConfigActionType.OpenNativeSettings>
| ReducerAction<ConfigActionType.StartAuthFlow>
| CommonAction;

Expand Down
15 changes: 0 additions & 15 deletions src/lib/ipc/models/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ export enum ConfigSection {
Explore = 'explore',
}

export enum ConfigV3Section {
Auth = 'generalAuth', // For UI
AdvancedConfig = 'advancedConfigs', // For UI
Explore = 'explore', // UI and functionality
}

export enum ConfigSubSection {
Auth = 'auth',
Issues = 'issues',
Expand All @@ -35,13 +29,4 @@ export enum ConfigSubSection {
StartWork = 'startWork',
}

export enum ConfigV3SubSection {
BbAuth = 'bitbucketAuth',
JiraAuth = 'jiraAuth',
StartWork = 'startWork',
Issues = 'issues',
Misc = 'misc',
Debug = 'debug',
}

export type FlattenedConfig = { [key: string]: any };
45 changes: 1 addition & 44 deletions src/lib/ipc/toUI/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ import { flatten } from 'flatten-anything';
import { AuthInfo, DetailedSiteInfo, emptyBasicAuthInfo, emptySiteInfo } from '../../../atlclients/authInfo';
import { emptyConfig } from '../../../config/model';
import { emptyFeedbackUser, FeedbackUser } from '../models/common';
import {
ConfigSection,
ConfigSubSection,
ConfigTarget,
ConfigV3Section,
ConfigV3SubSection,
FlattenedConfig,
} from '../models/config';
import { ConfigSection, ConfigSubSection, ConfigTarget, FlattenedConfig } from '../models/config';

export enum ConfigMessageType {
Init = 'init',
Expand All @@ -36,12 +29,6 @@ export type ConfigMessage =
| ReducerAction<ConfigMessageType.SectionChange, SectionChangeMessage>
| ReducerAction<ConfigMessageType.SitesUpdate, SitesUpdateMessage>;

export type ConfigV3Message =
| ReducerAction<ConfigMessageType.Init, ConfigV3InitMessage>
| ReducerAction<ConfigMessageType.Update, ConfigUpdateMessage>
| ReducerAction<ConfigMessageType.SectionChange, SectionV3ChangeMessage>
| ReducerAction<ConfigMessageType.SitesUpdate, SitesUpdateMessage>;

export type ConfigResponse =
| ReducerAction<ConfigMessageType.JQLOptionsResponse, JQLOptionsResponseMessage>
| ReducerAction<ConfigMessageType.JQLSuggestionsResponse, JQLSuggestionsResponseMessage>
Expand All @@ -61,19 +48,6 @@ export interface ConfigInitMessage {
initiateApiTokenAuth?: boolean;
machineId?: string;
}
export interface ConfigV3InitMessage {
config: FlattenedConfig;
jiraSites: SiteWithAuthInfo[];
bitbucketSites: SiteWithAuthInfo[];
feedbackUser: FeedbackUser;
isRemote: boolean;
showTunnelOption: boolean;
target: ConfigTarget;
section?: ConfigV3Section;
subSection?: ConfigV3SubSection;
initiateApiTokenAuth?: boolean;
machineId?: string;
}

export const emptyConfigInitMessage: ConfigInitMessage = {
config: flatten(emptyConfig),
Expand All @@ -86,17 +60,6 @@ export const emptyConfigInitMessage: ConfigInitMessage = {
section: ConfigSection.Jira,
};

export const emptyConfigV3InitMessage: ConfigV3InitMessage = {
config: flatten(emptyConfig),
jiraSites: [],
bitbucketSites: [],
feedbackUser: emptyFeedbackUser,
isRemote: false,
showTunnelOption: false,
target: ConfigTarget.User,
section: ConfigV3Section.Auth,
};

export interface ConfigUpdateMessage {
config: FlattenedConfig;
target: ConfigTarget;
Expand Down Expand Up @@ -138,9 +101,3 @@ export interface SectionChangeMessage {
subSection: ConfigSubSection | undefined;
initiateApiTokenAuth?: boolean;
}

export interface SectionV3ChangeMessage {
section: ConfigV3Section;
subSection: ConfigV3SubSection | undefined;
initiateApiTokenAuth?: boolean;
}
1 change: 0 additions & 1 deletion src/lib/webview/controller/config/configActionApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@ export interface ConfigActionApi {
viewJiraIssue(): void;
createPullRequest(): void;
viewPullRequest(): void;
openNativeSettings(): Promise<void>;
}
Loading
Loading