Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .github/workflows/i18n-sync-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,10 @@ jobs:

- name: Run sync check
run: pnpm dlx tsx packages/i18n/scripts/sync-check.ts --ci

# Report only, and deliberately not a gate: it infers whether a key is used from the string literals in apps/ and packages/, which is a heuristic that goes wrong the moment a key is assembled somewhere the template-prefix scan does not model. Gating on it would fail an unrelated PR for a key it never touched. `--summary` keeps it to counts and per-namespace totals; run `pnpm --filter @pace/i18n unused:check` locally for the full key list, and `--max=<n>` if this is ever ratcheted.
#
# The job's path filters are not widened for this step even though it reads every app: the number only needs to be visible when someone is already working on the catalogue, and triggering this workflow on all of apps/ would run it on nearly every PR to print a figure nothing gates on.
- name: Report unused keys
continue-on-error: true
run: pnpm dlx tsx packages/i18n/scripts/unused-check.ts --summary
32 changes: 32 additions & 0 deletions .rebase-pr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
# Rebase a PR branch onto origin/main, auto-resolving the workspace version bump
# that every branch carries and that therefore conflicts on every merge. Any
# conflict outside those package.json files stops the script for a human read.
set -uo pipefail
cd /Users/e-hu/Workspace/pace
BRANCH="$1"; VERSION="$2"
git checkout "$BRANCH" >/dev/null 2>&1 || exit 1
git rebase origin/main >/dev/null 2>&1
while [ -d .git/rebase-merge ] || [ -d .git/rebase-apply ]; do
UNMERGED=$(git diff --diff-filter=U --name-only)
if [ -z "$UNMERGED" ]; then
git -c core.editor=true rebase --continue >/dev/null 2>&1 || { echo "STUCK: rebase --continue failed"; exit 1; }
continue
fi
OTHER=$(echo "$UNMERGED" | grep -v -E '(^|/)package\.json$' || true)
if [ -n "$OTHER" ]; then
echo "MANUAL CONFLICT:"; echo "$OTHER"; exit 2
fi
echo "$UNMERGED" | xargs git checkout --ours --
./.setver.sh "$VERSION" >/dev/null
echo "$UNMERGED" | xargs git add
git -c core.editor=true rebase --continue >/dev/null 2>&1 || { echo "STUCK after resolve"; exit 1; }
done
# The bump commit may have been rebased before the version reached its final value.
CURRENT=$(node -p "require('/Users/e-hu/Workspace/pace/package.json').version")
if [ "$CURRENT" != "$VERSION" ]; then
./.setver.sh "$VERSION" >/dev/null
git commit -aqm "chore: bump the workspace version, which check-version requires of every PR"
fi
echo "REBASED $BRANCH onto $(git rev-parse --short origin/main) at version $VERSION"
git log --oneline origin/main..HEAD
21 changes: 21 additions & 0 deletions .setver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# Set every workspace package.json that is version-locked to the workspace release train.
set -euo pipefail
cd /Users/e-hu/Workspace/pace
V="$1"
for f in package.json apps/admin/package.json apps/space/package.json apps/web/package.json \
packages/codemods/package.json packages/constants/package.json packages/editor/package.json \
packages/hooks/package.json packages/i18n/package.json packages/propel/package.json \
packages/services/package.json packages/shared-state/package.json \
packages/tailwind-config/package.json packages/types/package.json \
packages/typescript-config/package.json packages/ui/package.json packages/utils/package.json; do
[ -f "$f" ] || continue
node -e '
const fs=require("fs"); const [f,v]=process.argv.slice(1);
let s=fs.readFileSync(f,"utf8");
const out=s.replace(/^(\s*"version":\s*")[^"]+(",?)$/m, `$1${v}$2`);
if(!/^\s*"version":\s*"/m.test(s)) { console.error("no version field in "+f); process.exit(1); }
fs.writeFileSync(f,out);
' "$f" "$V"
done
echo "all package.json set to $V"
Binary file removed apps/admin/core/assets/images/plane-takeoff.png
Binary file not shown.
1 change: 0 additions & 1 deletion apps/admin/core/store/instance.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ export class InstanceStore implements IInstanceStore {
if (this.instance === undefined && !instanceInfo?.instance?.workspaces_exist)
this.store.theme.toggleNewUserPopup();
runInAction(() => {
// console.log("instanceInfo: ", instanceInfo);
this.isLoading = false;
this.instance = instanceInfo.instance;
this.config = instanceInfo.config;
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "admin",
"version": "1.4.42",
"version": "1.4.43",
"private": true,
"description": "Admin UI for Pace",
"license": "AGPL-3.0",
Expand Down
7 changes: 0 additions & 7 deletions apps/api/internal/project/issue_create_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,3 @@ func issueCreateJSON(row issueListRow, location *time.Location) gin.H {
data["updated_at"] = row.UpdatedAt.In(location)
return data
}

func stringOrEmpty(value any) string {
if text, ok := value.(string); ok {
return text
}
return ""
}
4 changes: 0 additions & 4 deletions apps/api/internal/workspace/sidebar_preferences_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,3 @@ func preferenceFloat(raw json.RawMessage) (float64, error) {
}
return result, nil
}

func sidebarPreferenceJSON(preference WorkspaceUserPreference) gin.H {
return gin.H{"key": preference.Key, "is_pinned": preference.IsPinned, "sort_order": preference.SortOrder, "updated_at": preference.UpdatedAt}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed apps/space/core/assets/instance/plane-takeoff.png
Binary file not shown.
21 changes: 0 additions & 21 deletions apps/space/core/assets/logos/github-square.svg

This file was deleted.

11 changes: 0 additions & 11 deletions apps/space/core/assets/logos/github-white.svg

This file was deleted.

4 changes: 0 additions & 4 deletions apps/space/core/assets/project-not-published.svg

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import { MembersOutline } from "@pace/propel/icons";
import { Avatar, AvatarGroup } from "@pace/propel/avatar";
// pace utils
import { cn } from "@pace/utils";
// pace types
import type { TPublicMember } from "@pace/types";
// hooks
import { useMember } from "@/hooks/store/use-member";
//
import type { TPublicMember } from "@/types/member";

type Props = {
memberIds: string[];
Expand Down
2 changes: 1 addition & 1 deletion apps/space/core/hooks/store/use-instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ import type { IInstanceStore } from "@/store/instance.store";

export const useInstance = (): IInstanceStore => {
const context = useContext(StoreContext);
if (context === undefined) throw new Error("useUserProfile must be used within StoreProvider");
if (context === undefined) throw new Error("useInstance must be used within StoreProvider");
return context.instance;
};
2 changes: 1 addition & 1 deletion apps/space/core/hooks/store/use-issue-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ import type { IIssueDetailStore } from "@/store/issue-detail.store";

export const useIssueDetails = (): IIssueDetailStore => {
const context = useContext(StoreContext);
if (context === undefined) throw new Error("useUserProfile must be used within StoreProvider");
if (context === undefined) throw new Error("useIssueDetails must be used within StoreProvider");
return context.issueDetail;
};
2 changes: 1 addition & 1 deletion apps/space/core/hooks/store/use-issue-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ import type { IIssueFilterStore } from "@/store/issue-filters.store";

export const useIssueFilter = (): IIssueFilterStore => {
const context = useContext(StoreContext);
if (context === undefined) throw new Error("useUserProfile must be used within StoreProvider");
if (context === undefined) throw new Error("useIssueFilter must be used within StoreProvider");
return context.issueFilter;
};
2 changes: 1 addition & 1 deletion apps/space/core/hooks/store/use-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ import type { IStateStore } from "@/store/state.store";

export const useStates = (): IStateStore => {
const context = useContext(StoreContext);
if (context === undefined) throw new Error("useState must be used within StoreProvider");
if (context === undefined) throw new Error("useStates must be used within StoreProvider");
return context.state;
};
17 changes: 0 additions & 17 deletions apps/space/core/hooks/store/use-user-profile.ts

This file was deleted.

49 changes: 0 additions & 49 deletions apps/space/core/hooks/use-mention.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion apps/space/core/store/cycle.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { action, makeObservable, observable, runInAction } from "mobx";
// pace imports
import { SitesCycleService } from "@pace/services";
import type { TPublicCycle } from "@/types/cycle";
import type { TPublicCycle } from "@pace/types";
// store
import type { RootStore } from "./root.store";

Expand Down
16 changes: 8 additions & 8 deletions apps/space/core/store/issue-detail.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class IssueDetailStore implements IIssueDetailStore {
}
return issueCommentResponse;
} catch (error) {
console.log("Failed to add issue comment");
console.error("Failed to add issue comment");
throw error;
}
};
Expand Down Expand Up @@ -229,7 +229,7 @@ export class IssueDetailStore implements IIssueDetailStore {
};
});
} catch (_error) {
console.log("Failed to add issue vote");
console.error("Failed to delete issue comment");
}
};

Expand All @@ -245,7 +245,7 @@ export class IssueDetailStore implements IIssueDetailStore {
);
return res;
} catch (error) {
console.log("Error in uploading comment asset:", error);
console.error("Error in uploading comment asset:", error);
throw new Error("Asset upload failed. Please try again later.");
}
};
Expand All @@ -262,7 +262,7 @@ export class IssueDetailStore implements IIssueDetailStore {
);
return res;
} catch (error) {
console.log("Error in uploading comment asset:", error);
console.error("Error in uploading issue asset:", error);
throw new Error("Asset upload failed. Please try again later.");
}
};
Expand Down Expand Up @@ -363,7 +363,7 @@ export class IssueDetailStore implements IIssueDetailStore {
reaction: reactionHex,
});
} catch (_error) {
console.log("Failed to add issue vote");
console.error("Failed to add issue reaction");
const issueReactions = await this.issueService.listReactions(anchor, issueID);
runInAction(() => {
set(this.details, [issueID, "reaction_items"], issueReactions);
Expand All @@ -383,7 +383,7 @@ export class IssueDetailStore implements IIssueDetailStore {

await this.issueService.removeReaction(anchor, issueID, reactionHex);
} catch (_error) {
console.log("Failed to remove issue reaction");
console.error("Failed to remove issue reaction");
const reactions = await this.issueService.listReactions(anchor, issueID);
runInAction(() => {
set(this.details, [issueID, "reaction_items"], reactions);
Expand Down Expand Up @@ -415,7 +415,7 @@ export class IssueDetailStore implements IIssueDetailStore {

await this.issueService.addVote(anchor, issueID, data);
} catch (_error) {
console.log("Failed to add issue vote");
console.error("Failed to add issue vote");
const issueVotes = await this.issueService.listVotes(anchor, issueID);

runInAction(() => {
Expand All @@ -436,7 +436,7 @@ export class IssueDetailStore implements IIssueDetailStore {

await this.issueService.removeVote(anchor, issueID);
} catch (_error) {
console.log("Failed to remove issue vote");
console.error("Failed to remove issue vote");
const issueVotes = await this.issueService.listVotes(anchor, issueID);

runInAction(() => {
Expand Down
2 changes: 1 addition & 1 deletion apps/space/core/store/members.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { set } from "lodash-es";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// pace imports
import { SitesMemberService } from "@pace/services";
import type { TPublicMember } from "@/types/member";
import type { TPublicMember } from "@pace/types";
import type { RootStore } from "./root.store";

export interface IIssueMemberStore {
Expand Down
3 changes: 1 addition & 2 deletions apps/space/core/store/module.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { set } from "lodash-es";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// pace imports
import { SitesModuleService } from "@pace/services";
// types
import type { TPublicModule } from "@/types/modules";
import type { TPublicModule } from "@pace/types";
// root store
import type { RootStore } from "./root.store";

Expand Down
5 changes: 0 additions & 5 deletions apps/space/core/types/cycle.d.ts

This file was deleted.

6 changes: 0 additions & 6 deletions apps/space/core/types/intake.d.ts

This file was deleted.

6 changes: 0 additions & 6 deletions apps/space/core/types/member.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions apps/space/core/types/modules.d.ts

This file was deleted.

8 changes: 0 additions & 8 deletions apps/space/helpers/common.helper.ts

This file was deleted.

Loading
Loading