Feat/profile projects stats - #11032
Closed
aljem-mark wants to merge 30 commits into
Closed
aljem-mark wants to merge 30 commits into
aljem-mark wants to merge 30 commits into
Conversation
added 30 commits
September 4, 2026 21:06
- Create UserProjects.svelte - shows workspace projects list - Create UserStats.svelte - shows workspace issue/project stats - Add to GlobalProfileApp.svelte below bio/location section - Add i18n strings for Projects, NoProjects, Stats, NoStats - Update en.json translations
- Add ViewMyProfile i18n string to workbench plugin.ts - Add English translation for ViewMyProfile - Add menu action in AccountPopup.svelte (AccountRole.User block) - Navigation follows Select Workspace pattern: loc.path[0]=\"user\", path[1]=personUuid - Only shown when person.personUuid is available
The query { members: uuid } matches documents where the members array
contains the value (MongoDB array containment semantics), but
{ members: [uuid] } matches exact array equality, which never matches
since members is always a multi-entry array.
This was the root cause of "No projects found" despite the user
being an explicit member.
createdBy uses PersonId (social ID) and assignee uses Ref<Person> (document ref) - neither is compatible with PersonUuid/AccountUuid from the profile route. Projects query via members: AccountUuid is correct since AccountUuid extends PersonUuid (same UUID value). Stats now show workspace-level totals instead of per-user counts that would always return zero due to type mismatch.
…totals" This reverts commit 4bb3bc8.
The profile route provides userId as PersonUuid, but tracker and space fields use different identifier types: - assignee: Ref<Person> - resolved via Person lookup by personUuid - members: AccountUuid - resolved via Employee lookup by personUuid - createdBy: PersonId - cannot bridge from PersonUuid (social ID), permanently removed from stats Both components now resolve the correct identifiers at runtime before querying, matching how the existing sidebar queries work.
If userTrackr.class.Project and tracker.class.Issue with empty filters also return zero, the issue is in the build pipeline, not the query logic.
…ero results" This reverts commit 3e79d91.
… is available The View My Profile menu item was navigating to the top-level /user/<uuid> route which has no workspace client, causing getClient() to fail. Changes: - AccountPopup.svelte: navigate to path[2]=user, path[3]=personUuid (stays within workspace context, workspace client stays active) - GlobalProfileApp.svelte: detect workspace vs top-level route and read userId from the correct path index (path[3] for workspace, path[1] for top-level)
…e client is available" This reverts commit d5e5ba2.
- Add projects list and stats cards to the existing Profile.svelte in settings (workspace-scoped, getClient()/getCurrentAccount() available) - Use myEmployeeStore._id (Ref<Person>) for assignee query - Use account.uuid (AccountUuid) for members query - View My Profile menu item now navigates to settings -> profile - Add tracker dependency to setting-resources package.json
This reverts commit 88291ae.
…orkspaceData RPC) - New RPC endpoint getPersonWorkspaceData in server/account/src/operations.ts - Resolves account from token, queries all user workspaces - For each workspace, opens pipeline, queries projects + assigned issues - Returns data grouped by workspace - New ProfileWorkspaceData type in account-client/src/types.ts - New getPersonWorkspaceData method in account-client/src/client.ts - GlobalProfileApp.svelte now uses accountClient.getPersonWorkspaceData() - No workspace context required - profile page works at /user/<uuid> - Renders projects and stats grouped per workspace - Removed UserProjects.svelte and UserStats.svelte (replaced by RPC data) - View My Profile navigates to top-level /user/<uuid> route - Added server-tool, task, tracker deps to server/account/package.json
- Import ProfileWorkspaceData from @hcengineering/account-client instead of ./types where it does not exist - Add @hcengineering/account-client dependency to server/account/package.json - Use as any casts for AccountUuid/PersonId type mismatches - Use as any[] cast for project mapping to avoid WithLookup type issues - Rush update completed successfully
…adapter - PersonUuid != Ref<Person> (Mongo _id) so querying assignee with personUuid always returned zero. Now resolves Person document by personUuid first, then queries issues with person._id (Ref<Person>) - Add storageAdapter.close() in finally block to match ws-operations.ts pattern and prevent resource leaks - Add @hcengineering/contact dependency to server/account/package.json
…perations The TxOperations constructor expects a PersonId as its second argument. systemAccountUuid is AccountUuid (same runtime value, different branded type), causing TS2345. The workspace-service already uses the same pattern: core.account.ConfigUser. Also added core namespace import.
The getServerPipeline approach fails in Docker because the adapter factory is not available in the account container. The RPC now returns workspace membership data from the account DB only. Projects and issues will be queried client-side per workspace via getClient() when the user navigates into a workspace context.
…gregation The server-side pipeline approach failed in Docker (adapter factory not configured in account container). CTO approved new architecture: - Remove getPersonWorkspaceData RPC from server/account/operations.ts - Remove getPersonWorkspaceData from account-client (interface + impl) - GlobalProfileApp.svelte now uses getUserWorkspaces() + selectWorkspace() + clientFactory(token, endpoint) per workspace to query projects/issues - ProfileWorkspaceData type kept for client-side use - Add @hcengineering/client dependency to global-profile-resources No server changes needed, no Docker rebuilds. Works on /user/:uuid route.
This reverts commit 2467a76.
This reverts commit 4d79510.
Project rows on the profile page now navigate to the tracker project view using workbench path: [workbenchId, workspaceUrl, trackerId, projectId]. Added hover cursor style. Added @hcengineering/workbench dependency.
…s category grouping Added issuesOngoing and issuesCompleted to ProfileWorkspaceData type. Each workspace now fetches task.class.Status to map status IDs to categories (Active/ToDo = ongoing, Won = completed), then splits issue count into three stats. Replaced Projects stat card.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.