diff --git a/electron/src/paths.ts b/electron/src/paths.ts index deca22d91..bf15d87c3 100644 --- a/electron/src/paths.ts +++ b/electron/src/paths.ts @@ -31,6 +31,7 @@ const PREV_VER_USER_DATA_MIGRATION_FILE_PATHS = [ // Acorn 6 path.join(USER_DATA_PATH, `${MIGRATION_FILE_NAME_PREFIX}9`), // uncomment the below line for development testing + // of migration-feature // path.join(USER_DATA_PATH, `${MIGRATION_FILE_NAME_PREFIX}${INTEGRITY_VERSION_NUMBER}`), ] diff --git a/web/src/components/ExpandedViewMode/EVMiddleColumn/TabContent/EvDetails/EvDetails.component.tsx b/web/src/components/ExpandedViewMode/EVMiddleColumn/TabContent/EvDetails/EvDetails.component.tsx index 6df39659c..e0c34b8d0 100644 --- a/web/src/components/ExpandedViewMode/EVMiddleColumn/TabContent/EvDetails/EvDetails.component.tsx +++ b/web/src/components/ExpandedViewMode/EVMiddleColumn/TabContent/EvDetails/EvDetails.component.tsx @@ -364,6 +364,7 @@ const EvDetails: React.FC = ({ projectId={projectId} onClose={() => setEditAssignees(false)} activeAgentPubKey={activeAgentPubKey} + profilesPresent={presentMembers} people={people} outcomeActionHash={outcomeActionHash} createOutcomeMember={createOutcomeMember} diff --git a/web/src/components/Footer/Footer.scss b/web/src/components/Footer/Footer.scss index 6195f41df..a33689ed0 100644 --- a/web/src/components/Footer/Footer.scss +++ b/web/src/components/Footer/Footer.scss @@ -1,5 +1,6 @@ .footer { max-height: 48px; + z-index: 3; } /* Buttom Left Panel */ diff --git a/web/src/components/MigrationProgress/MigrationProgress.scss b/web/src/components/MigrationProgress/MigrationProgress.scss index 93e5217d2..383799db7 100644 --- a/web/src/components/MigrationProgress/MigrationProgress.scss +++ b/web/src/components/MigrationProgress/MigrationProgress.scss @@ -6,7 +6,7 @@ position: fixed; top: 0; background: var(--bg-color-canvas); - z-index: 10000; + z-index: 2; } .run-update-screen { diff --git a/web/src/components/PeoplePicker/PeoplePicker.tsx b/web/src/components/PeoplePicker/PeoplePicker.tsx index 191086637..96dac9a25 100644 --- a/web/src/components/PeoplePicker/PeoplePicker.tsx +++ b/web/src/components/PeoplePicker/PeoplePicker.tsx @@ -15,6 +15,7 @@ export type PeoplePickerProps = { isOutcomeMember: boolean outcomeMemberActionHash: ActionHashB64 })[] + profilesPresent: AgentPubKeyB64[] outcomeActionHash: ActionHashB64 createOutcomeMember: ( outcomeActionHash: ActionHashB64, @@ -27,6 +28,7 @@ export type PeoplePickerProps = { const PeoplePicker: React.FC = ({ activeAgentPubKey, people, + profilesPresent, outcomeActionHash, createOutcomeMember, deleteOutcomeMember, @@ -97,6 +99,12 @@ const PeoplePicker: React.FC = ({ activeAgentPubKey ) } + // check if the profile is in the + // list of present profiles + // (presence being "has the project open presently") + const isProfilePresent = !!profilesPresent.find( + (presentprofile) => person.agentPubKey === presentprofile + ) return (
  • = ({ avatarUrl={person.avatarUrl} imported={person.isImported} size="medium" - withStatus selfAssignedStatus={person.status} + disconnected={!isProfilePresent} + withStatus={isProfilePresent} />
    diff --git a/web/src/components/ProjectSettingsModal/ProjectSettingsModal.component.tsx b/web/src/components/ProjectSettingsModal/ProjectSettingsModal.component.tsx index 796af3621..a6244c7d8 100644 --- a/web/src/components/ProjectSettingsModal/ProjectSettingsModal.component.tsx +++ b/web/src/components/ProjectSettingsModal/ProjectSettingsModal.component.tsx @@ -117,7 +117,7 @@ function EditProjectForm({ export default function ProjectSettingsModal({ showModal, onClose, - project = {} as WithActionHash, + project, updateProjectMeta, openInviteMembersModal, cellIdString, diff --git a/web/src/components/UpdateModal/UpdateModal.tsx b/web/src/components/UpdateModal/UpdateModal.tsx index df1307506..ac699dbc2 100644 --- a/web/src/components/UpdateModal/UpdateModal.tsx +++ b/web/src/components/UpdateModal/UpdateModal.tsx @@ -32,6 +32,7 @@ const UpdateModal: React.FC = ({ }) => { const history = useHistory() const runUpdate = () => { + onClose() history.push('/run-update') } diff --git a/web/src/components/UpdatePromptModal/UpdatePromptModal.js b/web/src/components/UpdatePromptModal/UpdatePromptModal.js deleted file mode 100644 index 32cf2e0bd..000000000 --- a/web/src/components/UpdatePromptModal/UpdatePromptModal.js +++ /dev/null @@ -1,50 +0,0 @@ -import React from 'react' -import './UpdatePromptModal.scss' - -import Modal, { ModalContent } from '../Modal/Modal' -import { useHistory } from 'react-router-dom' - -export default function UpdatePromptModal({ show, onClose }) { - const history = useHistory() - const updateDetails = ( -
    -
    About this update
    -
    -
  • - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. -
  • -
  • - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. -
  • -
  • - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do - eiusmod tempor -
  • -
  • fixed some bugs
  • -
  • RSM refactoring
  • - - - ) - - const runUpdate = () => { - history.push('/run-update') - } - - return ( - <> - - - - - ) -} diff --git a/web/src/components/UpdatePromptModal/UpdatePromptModal.scss b/web/src/components/UpdatePromptModal/UpdatePromptModal.scss deleted file mode 100644 index a72fc3ea7..000000000 --- a/web/src/components/UpdatePromptModal/UpdatePromptModal.scss +++ /dev/null @@ -1,35 +0,0 @@ -.update-prompt-modal.modal-wrapper { - width: 540px; - min-height: 540px; - padding: 70px; -} - -.modal-content { - /* font-family: 'PlusJakartaSans-medium', Helvetica, Sans-Serif; */ - line-height: 1.45; -} - -.update-details-wrapper { - color: #696969; - margin: 30px 0; -} - -.update-details-title { - font-family: 'PlusJakartaSans-bold', Helvetica, Sans-Serif; - margin-bottom: 8px; -} - -.update-details-content { - font-size: 14px; - line-height: 1.45; -} - -.update-details-content li { - list-style-type: '🌰'; - padding-inline-start: 0.5ch; - margin-bottom: 2px; -} - -li::marker { - font-size: 12px; -} \ No newline at end of file diff --git a/web/src/hooks/useFinishMigrationChecker.ts b/web/src/hooks/useFinishMigrationChecker.ts index ce8ed096b..e33af4962 100644 --- a/web/src/hooks/useFinishMigrationChecker.ts +++ b/web/src/hooks/useFinishMigrationChecker.ts @@ -26,6 +26,7 @@ export default function useFinishMigrationChecker(): { } setHasChecked(true) } else { + // mock here if we want to test setHasChecked(true) } } diff --git a/web/src/hooks/useVersionChecker.ts b/web/src/hooks/useVersionChecker.ts index b10f42058..d19e9273f 100644 --- a/web/src/hooks/useVersionChecker.ts +++ b/web/src/hooks/useVersionChecker.ts @@ -134,7 +134,7 @@ export default function useVersionChecker( // to see if there is any new update available for the app useEffect(() => { if (isTest) { - setNewReleaseVersion('v1.0.0') + setNewReleaseVersion('v12.0.0') setReleaseNotes('release notes') setSizeForPlatform('1mb') return diff --git a/web/src/migrating/export.ts b/web/src/migrating/export.ts index 7ec18af98..a79792302 100644 --- a/web/src/migrating/export.ts +++ b/web/src/migrating/export.ts @@ -58,15 +58,30 @@ export async function internalExportProjectsData( store.dispatch, projectCellId ) - await Promise.all([ - projectDataFetchers.fetchProjectMeta(), - projectDataFetchers.fetchEntryPoints(), - projectDataFetchers.fetchOutcomeComments(), - projectDataFetchers.fetchOutcomeMembers(), - projectDataFetchers.fetchTags(), - projectDataFetchers.fetchOutcomes(), - projectDataFetchers.fetchConnections(), - ]) + try { + + await Promise.all([ + projectDataFetchers.fetchProjectMeta(), + projectDataFetchers.fetchEntryPoints(), + projectDataFetchers.fetchOutcomeComments(), + projectDataFetchers.fetchOutcomeMembers(), + projectDataFetchers.fetchTags(), + projectDataFetchers.fetchOutcomes(), + projectDataFetchers.fetchConnections(), + ]) + } catch (e) { + // fetch project meta will fail if the there IS no project meta + // and in that case we can just skip this project + // this solves for unsynced and uncanceled projects + if (e?.data?.data?.includes('no project meta exists')) { + // throw e + completedTracker++ + onStep(completedTracker, projectCellIds.length) + continue + } else { + throw e + } + } // step 2: collect the data to be exported for each project const allDataFetchedState: RootState = store.getState() const exportProjectData = collectExportProjectDataFunction( diff --git a/web/src/routes/App.component.tsx b/web/src/routes/App.component.tsx index f0443bbe0..4dff9f5ec 100644 --- a/web/src/routes/App.component.tsx +++ b/web/src/routes/App.component.tsx @@ -121,7 +121,8 @@ const App: React.FC = ({ ) // custom hooks const updateVersionInfo = useVersionChecker() - // set true to test + // to do development testing of migration-feature + // uncomment the following line (and comment the one above) // const updateVersionInfo = useVersionChecker(true) const finishMigrationChecker = useFinishMigrationChecker() const { fileDownloaded, setFileDownloaded } = useFileDownloaded() diff --git a/web/src/routes/VersionUpdateLeaving/VersionUpdateLeaving.tsx b/web/src/routes/VersionUpdateLeaving/VersionUpdateLeaving.tsx index e14d19e00..4c903a168 100644 --- a/web/src/routes/VersionUpdateLeaving/VersionUpdateLeaving.tsx +++ b/web/src/routes/VersionUpdateLeaving/VersionUpdateLeaving.tsx @@ -2,11 +2,10 @@ import React, { useEffect, useState } from 'react' import './VersionUpdateLeaving.scss' -import exportProjectsData, { - AllProjectsDataExport, -} from '../../migrating/export' +import exportProjectsData from '../../migrating/export' import { useStore } from 'react-redux' import MigrationProgress from '../../components/MigrationProgress/MigrationProgress' +import { AllProjectsDataExport } from 'zod-models' const checkIfExportNeeded = (currentVersion: string, toVersion: string) => { // compare @@ -137,7 +136,13 @@ const VersionUpdateLeaving: React.FC = ({ updateVersionInfo.newReleaseVersion ) ) { - runExport().then(controlDownloadNextVersion) + runExport().then(controlDownloadNextVersion).catch((e) => { + console.error('error running export', e) + setTitle('An unexpected error occurred.') + const message = 'You may be able to recover by quitting and restarting Acorn. Please report this issue and provide the following error to support: ' + JSON.stringify(e) + // throw new Error(message) + setStatus(message) + }) } else { controlDownloadNextVersion() } diff --git a/web/src/utils.ts b/web/src/utils.ts index 9b2b2386a..9280cea9d 100644 --- a/web/src/utils.ts +++ b/web/src/utils.ts @@ -1,6 +1,6 @@ import { HoloHash, CellId } from '@holochain/client' -// import BufferAll from 'buffer/' -// const Buffer = BufferAll.Buffer +import BufferAll from 'buffer/' +const Buffer = BufferAll.Buffer export function hashToString(hash: HoloHash) { // nodejs