This is the source code for zbugs.
We deploy this continuously (on trunk) to aws and is our dogfood of Zero.
- Docker
- Node 20+
First, install and build dependencies the mono repository root:
# In repository root
npm install
npm run buildThen, install dependencies in the zbugs directory:
# In apps/zbugs
npm installcd docker
docker compose upIn a a new terminal window
Create a .env file in the zbugs directory based on the example:
# In apps/zbugs
cp .env.example .envThen start the server:
# In apps/zbugs
npm run zero-cache-devIn yet another another terminal window
# In apps/zbugs
npm run devAfter you have visited the local website and the sync / replica tables have populated.
rm /tmp/zbugs-sync-replica.db*docker compose down -vcd docker
docker compose down -vPull large data set from s3
./get-data.shStart docker 1gb compose file
docker compose -f ./docker-compose-1gb.yml upModify the front end so that it doesn't load all of the data
diff --git a/apps/zbugs/src/pages/list/list-page.tsx b/apps/zbugs/src/pages/list/list-page.tsx
index 33cf7ef0b..c6955f753 100644
--- a/apps/zbugs/src/pages/list/list-page.tsx
+++ b/apps/zbugs/src/pages/list/list-page.tsx
@@ -93,6 +93,8 @@ export function ListPage({onReady}: {onReady: () => void}) {
q = q.whereExists('labels', q => q.where('name', label));
}
+ q = q.limit(200);
+
const [issues, issuesResult] = useQuery(q);
if (issues.length > 0 || issuesResult.type === 'complete') {
onReady();
diff --git a/apps/zbugs/src/zero-setup.ts b/apps/zbugs/src/zero-setup.ts
index 020330c40..8d0223a6a 100644
--- a/apps/zbugs/src/zero-setup.ts
+++ b/apps/zbugs/src/zero-setup.ts
@@ -60,7 +60,9 @@ export function preload(z: Zero<Schema>) {
const baseIssueQuery = z.query.issue
.related('labels')
- .related('viewState', q => q.where('userID', z.userID));
+ .related('viewState', q => q.where('userID', z.userID))
+ .orderBy('modified', 'desc')
+ .limit(200);
const {cleanup, complete} = baseIssueQuery.preload();
complete.then(() => {
Start zero and the frontend like normal