Commit Graph

5638 Commits

Author SHA1 Message Date
Kiril Videlov
8a97206f81 Improve layout and completions
- Remove `open` import and `onSelectProjectClick` function from `+layout.svelte` file

[src/routes/+layout.svelte]
- Remove the `open` import from the `+layout.svelte` file
- Remove the `onSelectProjectClick` function from the `+layout.svelte` file
2023-02-16 22:48:47 +01:00
Kiril Videlov
e04440abc4 Add local repos and update page layout
- Add a button to add a local repository
- Update the overview page template
- Remove the `DropDown` component from the layout
- Add a `+` button for adding new repositories
- Add a `Up to date` indicator
- Change the background color of the layout

[src/routes/+page.svelte]
- Add a button to add a local repository
- Add a list of recent projects to the overview page
- Update the overview page template
[src/routes/+layout.svelte]
- Remove the `DropDown` component from the layout
- Add a `+` button for adding new repositories
- Add a `Up to date` indicator
- Change the background color of the layout
- Change the text size of the `Up to date` indicator
2023-02-16 22:47:02 +01:00
Kiril Videlov
f5677447d1 Improve project/session navigation and layout styling
- Add Breadcrumbs component to project page
- Update BackForwardButtons size and colors
- Add context for project and session to the layout
- Change the search bar to a link to the user page
- Change the styling of the header to be more consistent

[src/routes/projects/[projectId]/+layout.svelte]
- Add `getContext` and `onDestroy` functions
- Set `contextProjectStore` to the current project
- Update the `lastSessionId` variable
[src/lib/components/index.ts]
- Add a Breadcrumbs component
- Export the Timeline, CodeViewer, BackForwardButtons and Login components
[src/lib/components/Breadcrumbs.svelte]
- Add a Breadcrumbs component
- Add the ability to link to a project
- Add the ability to link to a session
- Add a human readable timestamp for the session
[src/lib/components/BackForwardButtons.svelte]
- Increase button size from `w-3 h-3` to `w-4 h-4`
- Change the color of the buttons from `text-gray-400` to `text-zinc-400`
- Change the hover color of the buttons from `text-gray-300` to `text-zinc-200`
[src/routes/projects/[projectId]/sessions/[sessionId]/+page.svelte]
- Add `getContext` and `Writable` imports from `svelte`
- Add `onDestroy` to set `contextProjectStore` to `null` when destroyed
- Add `selection` variable
- Add `docsNext` derived variable
[src/routes/+layout.svelte]
- Add context for project and session to the layout
- Add breadcrumbs to the layout
- Change the search bar to a link to the user page
- Change the styling of the header to be more consistent
2023-02-16 21:32:31 +01:00
Nikita Galaiko
e1597c7963
push to git remote 2023-02-16 16:19:09 +01:00
Nikita Galaiko
1b8984c357
make git watcher fetch project on every iteration 2023-02-16 15:30:55 +01:00
Nikita Galaiko
dfa16066c1
make watchers into a struct 2023-02-16 15:30:55 +01:00
Nikita Galaiko
723823bccd
module isolation 2023-02-16 15:30:55 +01:00
Kiril Videlov
2127b0f151 Improve UI/UX for Tauri config window
- Update the title bar style to `Overlay`
- Set `minWidth` and `minHeight` for window

[src-tauri/tauri.conf.json]
- Change title bar style to `Overlay`
- Set `minWidth` and `minHeight` for window
2023-02-16 12:18:50 +01:00
Nikita Galaiko
de0dd25c90
project settings page 2023-02-16 12:16:24 +01:00
Kiril Videlov
374978cc1e Improve session selection UI and logic
- Update the styling and logic of the selection element in the project page
- Replace single class with two classes for the selection element

[src/routes/projects/[projectId]/sessions/[sessionId]/+page.svelte]
- Change the styling of the selection elements
- Change the logic of the selection element to use two different classes instead of one
2023-02-16 09:18:33 +01:00
Nikita Galaiko
bc6ac42a71
make watchers use anyhow 2023-02-15 16:57:22 +01:00
Nikita Galaiko
d2b85e614d
refactor users api to make it rust-first 2023-02-15 16:30:52 +01:00
Nikita Galaiko
a68e520f4d
projects update api 2023-02-15 15:44:47 +01:00
Kiril Videlov
c19e374476 Refactor project page & timeline session components
- Update project page layout to a `div` with a bottom border
- Adjust display width of session timeline based on session duration
- Add timeline session components to project page
- Add logic to determine if project exists
- Update authentication API calls and parse JSON responses
- Add new methods for creating login token and getting user object

[src/routes/+layout.svelte]
- Change div container from `flex` to `grid`
- Increase sidebar height from `10` to `12`
- Change sidebar width from `1/4` to `flex`
- Change main content width from `flex-grow` to `col-span-5`
- Add `dark` class to sidebar and main content
[src/lib/components/timeline/index.ts]
- Change the exported component from `TimelineDay` to `TimelineDaySession`
[src/routes/+layout.ts]
- Add an `add` method to the `projects` object
- Add `user` object to the `load` function
- Update the `projects` object to be initialized from an external source if not building
[src/routes/projects/[projectId]/+layout.svelte]
- Change the layout of the project page from a `div` to a `div` with a bottom border
[src/lib/components/timeline/TimelineDay.svelte]
- Delete the TimelineDay component
- Remove the code related to the component, including the `sessionDisplayWidth` function
[src/routes/projects/[projectId]/sessions/[sessionId]/+page.svelte]
- Replace the `border-y` class with `border-b` in the `+page.svelte` file
[src/routes/projects/[projectId]/+page.svelte]
- Add logic to adjust the display width of the session timeline based on session duration
- Add logic to determine if the project exists
- Add timeline session components to the project page
[src/lib/users.ts]
- Move imports to the top of the file
- Add a check to see if a user is logged in
- Set the store to the user if they are logged in
- Log the user when they are set
- Write the user to the file when they are set
[src/lib/authentication.ts]
- Change the URL for the API calls
- Parse JSON responses from the API
- Add a new method for creating a login token
- Add a new method for getting a user object
- Fix typo in error message
- Update the content-type header for API calls
[src/routes/projects/[projectId]/sessions/[sessionId]/+page.ts]
- Change the logic for finding the current session
- Make the code more precise in finding the current session
- Change the logic for finding the previous session
2023-02-15 15:36:20 +01:00
Kiril Videlov
c5c46e8a25 Increase selection and recording functionality
- Added a button to each delta for selection
- Updated the `session` store to return the first session if the sessionId is not found
- Updated the `previousSession` store to return the session before the current one if it exists
- Updated the `docsNext` derived store to include the `selection` store
- Added an `if` statement for `files` in `+page.svelte`

[src/routes/projects/[projectId]/sessions/[sessionId]/+page.ts]
- Changed the import of `svelte/store` to include `writable`
- Changed the `session` store to return the first session if the sessionId is not found
- Changed the `previousSession` store to return the session before the current one if it exists
[src/routes/projects/[projectId]/sessions/[sessionId]/+page.svelte]
- Move the `Timeline` component import from `+page.svelte`
- Initialize `selection` store in `+page.svelte`
- Update `docsNext` derived store to include the `selection` store
- Add a button to each delta for selection
- Add an `if` statement for `files` in `+page.svelte`
- Delete `contentWithDeltasApplied` function from `+page.
2023-02-15 14:53:14 +01:00
Kiril Videlov
5697b204cb wip 2023-02-15 10:44:49 +01:00
Kiril Videlov
cf34f525bb Update CodeViewer to use internal API for completions
- Update CodeViewer component to call `mergeView?.destroy()` before recreating the merge view
- Add a function to update the two editors when values change

[src/lib/components/CodeViewer.svelte]
- Remove commented out code
- Update code to call `mergeView?.destroy()` before recreating the merge view
- Add a function to update the two editors when the values change
2023-02-15 10:14:37 +01:00
Nikita Galaiko
29e76aa24c
include updater bundle when publishing 2023-02-15 09:18:19 +01:00
Kiril Videlov
692297ed8e Update CodeViewer to use MergeView
- Upgrade CodeViewer component to use MergeView
- Add collapseUnchanged option to MergeView
- Update @codemirror/state and @codemirror/view to latest version
- Add @codemirror/merge to dependencies and packages list

[package.json]
- Add @codemirror/merge dependency to package.json
[src/routes/projects/[projectId]/sessions/[sessionId]/+page.svelte]
- Change the `CodeViewer` value from `contentWithDeltasApplied` to `contentAtSessionStart` and `newValue` to `contentWithDeltasApplied`
[src/routes/projects/[projectId]/sessions/[sessionId]/+page.ts]
- Remove `console.log` line in `src/routes/projects/[projectId]/sessions/[sessionId]/+page.ts`
- Change type of `files` from `Record<string, string>` to `any`
[src/lib/components/CodeViewer.svelte]
- Change the code viewer from an EditorView to a MergeView
- Add a newValue prop to the CodeViewer component
- Update the update function to use the new MergeView
- Add collapseUnchanged option to the MergeView
- Remove unused code related to coloring the last edit
[pnpm-lock.yaml]
- Add `@codemirror/merge` to the dependencies and specifiers
- Update `@codemirror/state` to version `6.2.0`
- Update `@codemirror/view` to version `6.7.3`
- Add `@codemirror/merge` to the packages list with the specified resolution and dependencies
2023-02-14 18:33:55 +01:00
Kiril Videlov
6c62b563c9 Refactor deltas and timeline components
- Export `list()` function from `deltas.ts`
- Update `TimelineDaySession.svelte` to use `list()` and `deltas` instead of `listFiles` and `files`

[src/lib/deltas.ts]
- Change `list()` to `export const list()`
- Add type annotations to `list()` function parameters
[src/lib/components/timeline/TimelineDaySession.svelte]
- Change `listFiles` to `list`
- Change `files` to `deltas`
- Change `file` to `delta`
2023-02-14 17:37:45 +01:00
Nikita Galaiko
93e20b042f
update app name in every place 2023-02-14 16:26:17 +01:00
Nikita Galaiko
c8380dcf3b
another attempt to make actions name work 2023-02-14 16:20:43 +01:00
Nikita Galaiko
782a814245
change app title depending on dev/release 2023-02-14 16:20:43 +01:00
Kiril Videlov
8958246536 Improve code viewer display of deltas
- Add support for displaying files with deltas applied in the code viewer
- Add a type alias for `Delta` and a function to apply deltas to a string

[src/routes/projects/[projectId]/sessions/[sessionId]/+page.svelte]
- Add a type alias for `Delta`
- Add a function to apply deltas to a string
- Display files with deltas applied in the code viewer
2023-02-14 16:10:24 +01:00
Nikita Galaiko
b653965e2e
try to fix release product name 2023-02-14 16:00:04 +01:00
Nikita Galaiko
ea7e293673
update readme 2023-02-14 15:59:48 +01:00
Nikita Galaiko
a3c7704026
fix path to release cfg 2023-02-14 15:46:22 +01:00
Nikita Galaiko
9d4b3216ce
use release tauri config for publishing 2023-02-14 15:39:16 +01:00
Nikita Galaiko
dad31ae858
change dev app identifier 2023-02-14 15:37:05 +01:00
Kiril Videlov
8f010298a3 Increase recordings and internal API completions
- Add console log to the `load` function for debug purposes
- Add `listFiles` function from `$lib/sessions`
- Render list of files in `<div id="files">` with file name only

[src/routes/projects/[projectId]/sessions/[sessionId]/+page.ts]
- Add console log to the `load` function for debug purposes
[src/lib/components/timeline/TimelineDaySession.svelte]
- Add `listFiles` function from `$lib/sessions`
- Render list of files in `<div id="files">` with file name only
2023-02-14 15:32:53 +01:00
Nikita Galaiko
798a17d739
vendor libgit2 and openssl 2023-02-14 15:20:00 +01:00
Nikita Galaiko
cb90c84413
use anyhow lib for error context 2023-02-14 13:11:41 +01:00
Nikita Galaiko
9e457ec40c
display user email when logged in 2023-02-14 12:41:37 +01:00
Nikita Galaiko
db8ed8e58f
remove extensive error descriptions 2023-02-14 12:41:37 +01:00
Scott Chacon
51e981a54e make the whole directory before writing the delta file 2023-02-14 11:17:52 +01:00
Nikita Galaiko
0dda0afc90
open login page only once in the browser 2023-02-14 10:58:10 +01:00
Kiril Videlov
ebbcf38487 Update TimelineDaySessionActivities for internal API
- Update `TimelineDaySessionActivities` component to include activity message in the `title` attribute
- Update `TimelineDaySession` component to use `session.meta.startTs` and `session.meta.lastTs` for `session.startTime` and `session.endTime` respectively
- Uncomment `TimelineDaySessionActivities` component
- Change `session.activities` to `session.activity` in the `TimelineDaySession

[src/lib/components/timeline/TimelineDaySessionActivities.svelte]
- Change `title` attribute to include activity message
[src/lib/components/timeline/TimelineDaySession.svelte]
- Change `session.startTime` to `session.meta.startTs` in the `TimelineDaySessionActivities` component
- Change `session.endTime` to `session.meta.lastTs` in the `TimelineDaySessionActivities` component
- Uncomment the `TimelineDaySessionActivities` component
- Change `session.activities` to `session.activity` in the `TimelineDaySessionActivities` component
- Change
2023-02-14 10:52:13 +01:00
Nikita Galaiko
7d86eb365e
user login page and storage 2023-02-14 10:32:31 +01:00
Nikita Galaiko
51bae9bf36
change list_files logic
now list_files will always return files state on the beginning of a
session
2023-02-14 09:35:09 +01:00
Kiril Videlov
4a48ec5160 Improve project layout navigation
- Add link to last session in the project layout
- Change "Session" link to an anchor if there is a last session

[src/routes/projects/[projectId]/+layout.svelte]
- Add a `sessions` variable to the layout
- Add a link to the last session in the layout
- Change the "Session" link to an anchor if there is a last session
2023-02-14 09:13:56 +01:00
Kiril Videlov
54037e0dad Refactor layout and styling for projects
- Update layout to use flexbox
- Add draggable header, dropdown for project selection, and up-to-date indicator in the footer
- Add overflow-auto to sidebar and overflow-hidden to main content area
- Remove `position: fixed; width: 100%; height: 100%; overflow: hidden;` from the `<style>` tag
- Replace `flex` with `flex w-full h-full overflow-hidden`
- Wrap `

[src/routes/+layout.svelte]
- Change header to be draggable
- Change layout to use flexbox
- Add overflow-auto to sidebar
- Add border to sidebar
- Add dropdown for project selection
- Add footer with up-to-date indicator
- Add overflow-hidden to main content area
[src/app.html]
- Remove `position: fixed; width: 100%; height: 100%; overflow: hidden;` from the `<style>` tag
- Add `class="fixed h-full w-full overflow-hidden"` to the `<body>` tag
[src/routes/projects/[projectId]/sessions/[sessionId]/+page.svelte]
- Replace `flex` with `flex w-full h-full overflow-hidden`
- Wrap `CodeViewer` in a `details` tag
- Add `Timeline` div
[src/routes/projects/[projectId]/+layout.svelte]
- Remove `<div class="">` and `</div>` from the layout
- Change link from `Week` to `Day`
- Remove the closing tag for the script section
2023-02-13 22:35:09 +01:00
Kiril Videlov
661f77de41 Refactor session navigation and deltas API
- Refactor SessionNavBlock, SessionNav, and sessions.ts to improve UX and performance
- Add CodeViewer component for all file paths
- Update type definitions in deltas.ts
- Add links to previous and next session if they exist

[src/lib/components/session/SessionNavBlock.svelte]
- Change border padding for SessionNavBlock from `p-2` to `px-2 py-1`
- Add hover effect to SessionNavBlock border when hovered
[src/routes/projects/[projectId]/sessions/[sessionId]/+page.svelte]
- Move initialization of `octokit` to a separate file
- Replace `toHumanReadableTime` with `writable` store
- Replace hardcoded navigation links with `SessionNav` component
- Add `CodeViewer` component for all file paths
- Add `derived` store for `docs`
- Replace `data` with `$deltas` in `derived` store
- Replace hardcoded `debug` with `session hash`
- Add
[src/lib/deltas.ts]
- Fix typo in the parameters type definition of the `list_deltas` function
- Update type definition of the `export default` function to match the `list_deltas` function
[src/lib/components/session/SessionNav.svelte]
- Change the class of the `session-nav` div from `my-2` to `text-sm`
- Change the `extraClasses` of the `SessionNavBlock` from `p-4` to `py-2`
- Add a link to the previous session if it exists
- Add a link to the next session if it exists
[src/lib/sessions.ts]
- Change `id` type in `Session` from `string` to `string;`
2023-02-13 21:17:36 +01:00
Kiril Videlov
2a2f8bc7fe Refactor list_files() to use session base commit
- Ensure files are always listed from the session base commit
- Simplify the `list_files()` function by removing the `match` statement
2023-02-13 20:44:25 +01:00
Kiril Videlov
aa1518ac73 Increase precision of timestamps in human readable format
- Change the timestamp to milliseconds before converting to human readable time
2023-02-13 19:52:37 +01:00
Kiril Videlov
6daf016c44 Increase reliability of session recordings and completions
- Refactored session handling code
- Improved performance and scalability
- Fixed several bugs related to session handling
- Updated documentation
2023-02-13 19:49:32 +01:00
Nikita Galaiko
62f0a4e914
treat current session just like any other session 2023-02-13 16:46:26 +01:00
Kiril Videlov
a29210e81a Update session navigation layout and styling
- Update session navigation for projects
- Add navigation for previous and next sessions
- Update navigation layout for sessions
- Add a `hover` and `extraClasses` export variable to `SessionNavBlock` component
2023-02-13 16:40:51 +01:00
Kiril Videlov
2e8fafb22d Improve navigation and time formatting for sessions
- Add a `SessionNavBlock` component for navigating between sessions
- Add a `toHumanReadableTime` helper function
- Store the current session in a `session` variable
- Add `previousSession` and `nextSession` variables to store the previous and next session in the list
- Add logic to handle edge cases when the current session is the first or last in the list
- Add a link for the Day label in the Projects layout
2023-02-13 15:51:14 +01:00
Nikita Galaiko
e38a062dfa
is dev_mode in rust part 2023-02-13 12:36:56 +01:00
Nikita Galaiko
57ad560900
store complete logs directory inside session 2023-02-13 10:47:43 +01:00