Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

[Experiment] Routing #323

Closed
wants to merge 13 commits into from
Closed

[Experiment] Routing #323

wants to merge 13 commits into from

Conversation

MarcMcIntosh
Copy link
Collaborator

@MarcMcIntosh MarcMcIntosh commented Feb 4, 2025

Add routing library

Description

The pagesSlice / feature / component level routing has started to become a liability, this branch investigates on replacing it with an in memory router so that paths can be used to render pages.

Vscode currently occupies the native navigation, so a in memory solution had to be selected.

There's a fair amount of work to do with replacing the current navigation paths.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes, only code improvements)
  • Documentation update

How to Test

  • Step 1:
  • Step 2:
  • ...

Screenshots (if applicable)

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.
  • I have updated the documentation where necessary.

Linked Issues

https://refact.fibery.io/Software_Development/UI-chat-js-133#Task/TBD-SPIKE-normalise-navigation-453
https://refact.fibery.io/Software_Development/UI-chat-js-133#Task/SPIKE-Routing-804

Additional Notes

@MarcMcIntosh MarcMcIntosh changed the base branch from main to alpha February 4, 2025 13:31
 Conflicts:
	src/components/Toolbar/Toolbar.tsx
	src/features/App.tsx

 Changes to be committed:
	modified:   package-lock.json
	modified:   package.json
	modified:   src/__fixtures__/chat.ts
	modified:   src/__fixtures__/chat_config_thread.ts
	modified:   src/__fixtures__/chat_links_response.ts
	new file:   src/__fixtures__/chat_textdoc.ts
	modified:   src/__fixtures__/checkpoints.ts
	modified:   src/__fixtures__/history.ts
	modified:   src/__fixtures__/index.ts
	new file:   src/__fixtures__/knowledge.ts
	modified:   src/__fixtures__/msw.ts
	modified:   src/__fixtures__/some_chrome_screenshots.ts
	modified:   src/__tests__/DeleteChat.test.tsx
	deleted:    src/__tests__/PinMessages.test.tsx
	modified:   src/__tests__/RestoreChat.test.tsx
	modified:   src/app/middleware.ts
	modified:   src/app/store.ts
	modified:   src/components/Callout/Callout.tsx
	modified:   src/components/Chat/Chat.stories.tsx
	modified:   src/components/Chat/Chat.tsx
	modified:   src/components/ChatContent/AssistantInput.tsx
	modified:   src/components/ChatContent/ChatContent.stories.tsx
	modified:   src/components/ChatContent/ChatContent.tsx
	new file:   src/components/ChatContent/LikeButton.module.css
	new file:   src/components/ChatContent/LikeButton.tsx
	modified:   src/components/ChatContent/ToolsContent.tsx
	modified:   src/components/ChatForm/AgentCapabilities.tsx
	modified:   src/components/ChatForm/ChatControls.tsx
	modified:   src/components/ChatForm/ChatForm.tsx
	new file:   src/components/ChatForm/SuggestNewChat/SuggestNewChat.module.css
	new file:   src/components/ChatForm/SuggestNewChat/SuggestNewChat.tsx
	new file:   src/components/ChatForm/SuggestNewChat/index.ts
	modified:   src/components/ChatForm/ToolConfirmation.tsx
	modified:   src/components/ChatForm/useCommandCompletionAndPreviewFiles.ts
	modified:   src/components/ChatForm/useInputValue.ts
	modified:   src/components/ChatForm/utils.ts
	modified:   src/components/ChatLinks/UncommittedChangesWarning.tsx
	modified:   src/components/ComboBox/ComboBox.test.tsx
	modified:   src/components/ComboBox/ComboBox.tsx
	modified:   src/components/IntegrationsView/DisplayIntegrations/IntegrationCard.module.css
	modified:   src/components/IntegrationsView/DisplayIntegrations/IntegrationCard.tsx
	new file:   src/components/IntegrationsView/DisplayIntegrations/useUpdateIntegration.ts
	modified:   src/components/IntegrationsView/Header/IntegrationsHeader.tsx
	modified:   src/components/IntegrationsView/IntegrationDocker/IntegrationDocker.tsx
	modified:   src/components/IntegrationsView/IntegrationForm/FormFields.tsx
	modified:   src/components/IntegrationsView/IntegrationForm/IntegrationForm.tsx
	new file:   src/components/IntegrationsView/IntegrationsTable/ArgumentsTable.tsx
	modified:   src/components/IntegrationsView/IntegrationsTable/ConfirmationTable.tsx
	modified:   src/components/IntegrationsView/IntegrationsTable/DefaultCell.tsx
	new file:   src/components/IntegrationsView/IntegrationsTable/EnvironmentVariablesTable.tsx
	modified:   src/components/IntegrationsView/IntegrationsTable/ParametersTable.tsx
	modified:   src/components/IntegrationsView/IntegrationsView.tsx
	modified:   src/components/IntegrationsView/hooks/useFormAvailability.ts
	modified:   src/components/IntegrationsView/hooks/useIntegrations.ts
	deleted:    src/components/IntegrationsView/icons/chrome.png
	deleted:    src/components/IntegrationsView/icons/cmdline.png
	deleted:    src/components/IntegrationsView/icons/docker.png
	deleted:    src/components/IntegrationsView/icons/github-dark.png
	deleted:    src/components/IntegrationsView/icons/github-light.png
	deleted:    src/components/IntegrationsView/icons/gitlab.png
	deleted:    src/components/IntegrationsView/icons/iconMap.ts
	deleted:    src/components/IntegrationsView/icons/mysql.png
	deleted:    src/components/IntegrationsView/icons/pdb.png
	deleted:    src/components/IntegrationsView/icons/postgres.png
	modified:   src/components/Markdown/CodeBlock.tsx
	modified:   src/components/Markdown/Markdown.tsx
	modified:   src/components/Sidebar/Sidebar.tsx
	modified:   src/components/TextArea/TextArea.tsx
	modified:   src/components/Toolbar/Dropdown.tsx
	modified:   src/components/Toolbar/Toolbar.tsx
	new file:   src/components/Tools/Texdoc.module.css
	new file:   src/components/Tools/Textdoc.tsx
	new file:   src/components/Tools/types.ts
	modified:   src/events/index.ts
	modified:   src/features/App.tsx
	modified:   src/features/Chat/Thread/actions.ts
	modified:   src/features/Chat/Thread/reducer.ts
	modified:   src/features/Chat/Thread/selectors.ts
	modified:   src/features/Chat/Thread/types.ts
	modified:   src/features/Chat/activeFile.ts
	new file:   src/features/Chat/currentProject.ts
	modified:   src/features/Checkpoints/CheckpointButton.tsx
	modified:   src/features/Checkpoints/Checkpoints.stories.tsx
	modified:   src/features/Checkpoints/Checkpoints.tsx
	modified:   src/features/Checkpoints/checkpointsSlice.ts
	modified:   src/features/Checkpoints/types.ts
	new file:   src/features/Config/FeatureMenu.tsx
	modified:   src/features/Config/configSlice.ts
	modified:   src/features/History/historySlice.ts
	modified:   src/features/Integrations/IntegrationFormField.tsx
	new file:   src/features/Knowledge/KnowledgeForms.module.css
	new file:   src/features/Knowledge/KnowledgeForms.tsx
	new file:   src/features/Knowledge/KnowledgeList.stories.tsx
	new file:   src/features/Knowledge/KnowledgeList.tsx
	new file:   src/features/Knowledge/VecDbStatus.module.css
	new file:   src/features/Knowledge/VecdbStatus.tsx
	new file:   src/features/Knowledge/index.ts
	new file:   src/features/Knowledge/knowledgeSlice.ts
	new file:   src/features/Knowledge/useKnowledgeSearch.ts
	modified:   src/features/Login/LoginPage.tsx
	modified:   src/features/Pages/pagesSlice.ts
	new file:   src/features/PatchesAndDiffsTracker/patchesAndDiffsTrackerSlice.ts
	modified:   src/features/ToolConfirmation/confirmationSlice.ts
	modified:   src/hooks/index.ts
	modified:   src/hooks/useCapsForToolUse.ts
	modified:   src/hooks/useCheckpoints.ts
	modified:   src/hooks/useEventBusForApp.ts
	modified:   src/hooks/useEventBusForIDE.ts
	modified:   src/hooks/useLinksFromLsp.ts
	modified:   src/hooks/useLogin.ts
	modified:   src/hooks/useLogout.ts
	deleted:    src/hooks/usePatchActions.ts
	new file:   src/hooks/usePatchesAndDiffEventsForIDE.ts
	new file:   src/hooks/usePreviewCheckpoints.ts
	modified:   src/hooks/useSendChatRequest.ts
	modified:   src/main.tsx
	modified:   src/services/refact/checkpoints.ts
	modified:   src/services/refact/commands.ts
	modified:   src/services/refact/consts.ts
	modified:   src/services/refact/diffs.ts
	modified:   src/services/refact/index.ts
	modified:   src/services/refact/integrations.ts
	new file:   src/services/refact/knowledge.ts
	modified:   src/services/refact/links.ts
	modified:   src/services/refact/tools.ts
	modified:   src/services/refact/types.ts
	deleted:    src/utils/extractFilePathFromPin.ts
	new file:   src/utils/formatIntegrationIconPath.ts
	new file:   src/utils/getIntegrationInfo.ts
	modified:   src/utils/index.ts
	new file:   src/utils/isDetailMessage.ts
	modified:   src/utils/trimIndent.ts
	modified:   src/utils/utils.test.tsx
	modified:   src/utils/validateSnakeCase.ts
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant