Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache database on client #7

Open
wants to merge 224 commits into
base: develop
Choose a base branch
from
Open

cache database on client #7

wants to merge 224 commits into from

Conversation

jackkav
Copy link
Owner

@jackkav jackkav commented Sep 6, 2023

motivation:

frequent reloads caused by remix actions currently hit the fs too much in workspace loader and cause delays proportional to number of requests

idea:

recreate the client copy of the database previous in redux. This will extend the lifespan of the data beyond the current render.

options:

  • exact copy of the whole database
  • copy of this workspace data
  • copy of the sidebar data

jackkav and others added 30 commits June 21, 2023 17:45
* workspace migration logs

* add try catches around all the migrations
* savez

* ai animation

* save

* fixes

* improvements to ux and loading states

* ux improvements

* delete unused file

* undo vscode settings changes

* add prod api url

* remove console

* fixes

* rename loading to generating

* remove extra case in ai settings

* generate a new folder for the generated requests

* fix icon

* fix unused import
* add UI warning

* add CLI deprecation warning
* exclude macos release

* more exclusion
* many ws

* squashed import commits

* split import to project and workspace

* import logic

* fix the collection to design bug

* rename type

* fix tests

* tidy workspace loader

* multiple ws imports should always create new ws

* fall back to default project

* env var to bool

* fix tests

* fix app/import

* provide import context in title

* fix api spec import

* clean up

* ask about private envs everytime

* fix loading

* fix export private dialog
* make all migration functions non-async

* migrate is not a promise

* simplify scope migration

* remove apispec and fix test

* fix tests

* fix tests, for real this time

* removed api spec from collection

* default doc name to my-spec.yaml again

* fix apispec typing

* remove pointless generic

* fix type

* Create an api spec on first launch

* Remove flaky firstLaunch data creation

* fix test

* create apispec only when scope is deisgn

* oauth test left

* gitlab test

---------

Co-authored-by: gatzjames <[email protected]>
* include debug instructions

* remove pkg as a dependency

* fix doc

* add tslib to send-request to fix libcurl pkg bs

* bump pkg to 5.8.1

* remove not needed scripts
* electron 23 bump

* lock files

* fix type
* chore: change electron-builder mac notarize config

* add teamId

---------

Co-authored-by: jackkav <[email protected]>
* allow header without value

* tidy

* fix test
* wip

* manually revert 4872 disabling request validator circular refs

* clean up

* clean up
* show backup status

* use preload

* clean up update code

* remove notifcation indirection

* cleanup app start event

* more cleaning

* remove confusing state and double ipc channels

* add update detection ocnsole log

* add error ux and tidy
* add delay

* show backup message
* v3.18.0

* Bump app version to 2023.4.0 and lerna package versions

---------

Co-authored-by: Jack Kavanagh <[email protected]>
* bump

* lockfiles

* upgrade doc
* bump deps

* lockfiles

* revert oidc bump

* remove dep

* refresh lock files

* refresh insomnia app lock file

* fix test

* more lock files
* chore: bump lerna v6

* edit
…ng#5945)

* share design documents and tests with insomnia sync

* share collection and documents with insomnia/git sync

* checkpoint

* redirect when cloning (pulling) a new remote project

* backend workspace card

* redirect logic

* local changes styles

* loading indicator

* fix sync button styles

* use interval to refetch git

* open the repo modal first before switching to git sync

* use gitRepositoryId from metadata

* fix sync option update

* cleanup fetcher check

* fixes

* cleanup pull-push

* undo logo change

* clean git-vcs

* use cloud icon for insomnia sync

* cleanup card

* more cleanup

* better return type for fetchfetcher

* update git tests

* fix tests

* fix some prerelease tests

* fix cloning without an api spec

* fix some more tests that expect a file to exist

* fix lint error
* add abi

* hide ai 500 error

* handle new URL exception
jackkav and others added 29 commits August 23, 2023 08:21
* fix: render fail on workspace dropdown in req group settings

* match move/copy select implementation

* fix move request navigate

---------

Co-authored-by: jackkav <[email protected]>
* remove pad left on pinned

* refactor filter logic

* first pass

* always create new curl req

* use terminal icon

* fix from curl folder

* wire up request create

* fix paste curl in url bar

* fix types

* fix test

* fix for initial draw isvalid check

---------

Co-authored-by: Filipe Freire <[email protected]>
* some notes on approach

* some broken fs logic

* some more broke stuff

* fix backup logic

* rename export to backup

* wire up a restore

* restore check

* only update if newer version

* extract to function

* rename export to backup
* project tailwind/aria-components

* update tests

* add failing test

* update e2e tests

* fix workspace name issue

* fix scroll issue

* bye test

---------

Co-authored-by: Filipe Freire <[email protected]>
…Kong#6403)

* chore: Add test to check for backups on new version to critical tests

* check for backups folder contents

* change env var on gh actions file

* fix
* revalidate only when orgs change

* remove hasRun cache

* use hash value to revalidate on login
* fix cp

* remove patch log

* console logs

* handle bad oauth2 config
* add gql shorthand

* fix types
…es) (Kong#6419)

* Fix processing of DOM nodes during the production build (minified names)

* eliminate most of the typescript casting

---------

Co-authored-by: jackkav <[email protected]>
* remove line that flakes

* remove sort from filter test

* move some prerelease to smoke

* flatten and fix test

* fix test locator
* move organizations outside of root

* add comments for shouldRevalidate logic
* fallback to insomnia user agent

* add default user-agent to oauth2
* show github reason in error

* detect http errors

* add httperror support

* handle checkout
* re add user-agent

* fix lint

* fix tests
### motivation:
frequent reloads caused by remix actions currently hit the fs too much in workspace loader and cause delays proportional to number of requests

### idea:
recreate the client copy of the database previous in redux. This will extend the lifespan of the data beyond the current render.

### options:
- exact copy of the whole database
- copy of this workspace data
- copy of the sidebar data
<!--
Please open an [Issue](https://github.com/kong/insomnia/issues/new) first to discuss new
features or non-trivial changes. Please provide as much detail as possible on the change as
possible including general description, implementation details, potential shortcomings, etc.

If this PR closes an issue, please mention "Closes #XX" where #XX is the issue number.

If this PR fixes a bug or regression, please make sure to add a test.
-->
@jackkav jackkav changed the base branch from perf/sidebar-1 to develop September 6, 2023 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.