Skip to content

Issue 173 - #179

Open
aryansinha1908 wants to merge 3 commits into
Open-Source-Kigali:developfrom
aryansinha1908:issue-173
Open

Issue 173#179
aryansinha1908 wants to merge 3 commits into
Open-Source-Kigali:developfrom
aryansinha1908:issue-173

Conversation

@aryansinha1908

Copy link
Copy Markdown
Contributor

Summary

Adds Prettier formatting to apps/web and packages/protocol to match the existing configuration in apps/server, preventing future style drift and noisy whitespace diffs.

To make this large change reviewable, the PR is structured into three separate commits:

  1. Config + Scripts: Adds .prettierrc, package.json scripts, and updates CONTRIBUTING.md.
  2. Mechanical Formatting: The automated prettier --write output applied to all source files.
  3. Git Blame Ignore: Adds a .git-blame-ignore-revs file containing the SHA of the mechanical formatting commit so git blame remains useful.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Docs
  • Infrastructure / CI
  • Breaking change

Areas touched

  • apps/server (NestJS)
  • apps/web (React / Vite)
  • apps/agent (Go)
  • packages/protocol (shared WebSocket contracts)
  • infrastructure / .github/workflows
  • docs

Related issues

Closes #173

How to test

  1. Check out this branch locally.
  2. Run npm run format --workspace=@docksight/web and npm run format --workspace=@docksight/protocol. Running it should produce zero modified files, proving the formatting is fully applied.
  3. Run npm run lint --workspace=@docksight/web to verify that oxlint and Prettier are not fighting or throwing conflicting errors.
  4. Run npm run build --workspace=@docksight/web to verify the build still succeeds.

Checklist

  • Change is focused and stays within the existing modular monolith boundaries.
  • Ran the relevant checks locally (see below).
  • Updated docs under docs/ if module boundaries or the protocol changed. (Updated CONTRIBUTING.md)
  • Added an ADR under docs/decisions/ if this is a larger architectural change.
Local checks
# packages/protocol must be built first — apps/server and apps/web
# import it from its dist output.
npm run build --workspace=@docksight/protocol
npm run test  --workspace=@docksight/protocol

npm run build --workspace=@docksight/server
npm run lint  --workspace=@docksight/server
npm run test  --workspace=@docksight/server

npm run build --workspace=@docksight/web
npm run lint  --workspace=@docksight/web

Copilot AI lite review requested due to automatic review settings August 31, 2026 09:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Prettier-based formatting to the apps/web and packages/protocol workspaces (aligned with the existing apps/server Prettier config) and applies a mechanical formatting pass to reduce style drift and whitespace-only diffs. Also updates contributor guidance and adds a blame-ignore rev list to keep git blame usable after the reformat.

Changes:

  • Add workspace-local Prettier configs (.prettierrc) and format npm scripts for @docksight/web and @docksight/protocol.
  • Apply a mechanical prettier --write formatting pass across TS/TSX sources (plus minor doc/table formatting).
  • Add .git-blame-ignore-revs entry for the reformat commit and update CONTRIBUTING.md with formatting commands.

Reviewed changes

Copilot reviewed 91 out of 110 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.git-blame-ignore-revs Ignore the mechanical Prettier commit in git blame.
CONTRIBUTING.md Document formatting workflow + table/link formatting.
apps/server/src/agents/agents.module.ts Prettier formatting only.
apps/server/src/agents/agents.service.spec.ts Prettier formatting only.
apps/server/src/agents/agents.service.ts Prettier formatting only.
apps/server/src/agents/container-inventory.service.ts Prettier formatting only.
apps/server/src/common/database/database.config.ts Prettier formatting only.
apps/server/src/common/database/prisma.module.ts Prettier formatting only.
apps/server/src/common/database/prisma.service.ts Prettier formatting only.
apps/server/src/common/index.ts Prettier formatting only.
apps/server/src/common/redis/redis.module.ts Prettier formatting only.
apps/server/src/common/redis/redis.service.ts Prettier formatting only.
apps/server/src/containers/containers.service.ts Prettier formatting only.
apps/server/src/hosts/dto/update-host.dto.ts Prettier formatting only.
apps/server/src/hosts/hosts.controller.ts Prettier formatting only.
apps/server/src/hosts/hosts.module.ts Prettier formatting only.
apps/server/src/main.ts Prettier formatting only.
apps/server/test/app.e2e-spec.ts Prettier formatting only.
apps/web/.prettierrc Add Prettier config for the web workspace.
apps/web/package.json Add format script for the web workspace.
apps/web/src/app/App.tsx Prettier formatting only.
apps/web/src/app/providers.tsx Prettier formatting only.
apps/web/src/components/ConfirmProvider.tsx Prettier formatting only.
apps/web/src/components/ContainerLogsDrawer.tsx Prettier formatting only.
apps/web/src/components/ContainerMetrics.tsx Prettier formatting only.
apps/web/src/components/ErrorBoundary.tsx Prettier formatting only.
apps/web/src/components/HostCard.tsx Prettier formatting only.
apps/web/src/components/HostSelect.tsx Prettier formatting only.
apps/web/src/components/OsIcon.tsx Prettier formatting only.
apps/web/src/components/StatusBadge.tsx Prettier formatting only.
apps/web/src/components/StatTile.tsx Prettier formatting only.
apps/web/src/components/ToastProvider.tsx Prettier formatting only.
apps/web/src/components/auth/RequireAuth.tsx Prettier formatting only.
apps/web/src/components/charts/Sparkline.tsx Prettier formatting only.
apps/web/src/components/layout/AppShell.tsx Prettier formatting only.
apps/web/src/components/layout/Sidebar.tsx Prettier formatting only.
apps/web/src/components/ui/badge.tsx Prettier formatting only.
apps/web/src/components/ui/button.tsx Prettier formatting only.
apps/web/src/components/ui/card.tsx Prettier formatting only.
apps/web/src/components/ui/copy-button.tsx Prettier formatting only.
apps/web/src/components/ui/data-list.tsx Prettier formatting only.
apps/web/src/components/ui/dropdown.tsx Prettier formatting only.
apps/web/src/components/ui/drawer.tsx Prettier formatting only.
apps/web/src/components/ui/empty-state.tsx Prettier formatting only.
apps/web/src/components/ui/input.tsx Prettier formatting only.
apps/web/src/components/ui/pagination.tsx Prettier formatting only.
apps/web/src/components/ui/skeleton.tsx Prettier formatting only.
apps/web/src/components/ui/tabs.tsx Prettier formatting only.
apps/web/src/features/auth/AuthLayout.tsx Prettier formatting only.
apps/web/src/features/auth/LoginPage.tsx Prettier formatting only.
apps/web/src/features/auth/SetupPage.tsx Prettier formatting only.
apps/web/src/features/containers/ContainersPage.tsx Prettier formatting only.
apps/web/src/features/dashboard/DashboardPage.tsx Prettier formatting only.
apps/web/src/features/hosts/HostsPage.tsx Prettier formatting only.
apps/web/src/features/inventory/InventoryPages.tsx Prettier formatting only.
apps/web/src/features/inventory/InventoryTables.tsx Prettier formatting only.
apps/web/src/features/metrics/MetricsPage.tsx Prettier formatting only.
apps/web/src/features/not-found/NotFoundPage.tsx Prettier formatting only.
apps/web/src/features/settings/SettingsPage.tsx Prettier formatting only.
apps/web/src/hooks/useContainerAction.ts Prettier formatting only.
apps/web/src/hooks/useContainerCommands.ts Prettier formatting only.
apps/web/src/hooks/useContainerInspect.ts Prettier formatting only.
apps/web/src/hooks/useContainers.ts Prettier formatting only.
apps/web/src/hooks/useDocumentTitle.ts Prettier formatting only.
apps/web/src/hooks/useHostInventory.ts Prettier formatting only.
apps/web/src/hooks/useHostMetrics.ts Prettier formatting only.
apps/web/src/hooks/useHosts.ts Prettier formatting only.
apps/web/src/hooks/useRenameHost.ts Prettier formatting only.
apps/web/src/lib/format.ts Prettier formatting only.
apps/web/src/lib/host-name.test.ts Prettier formatting only.
apps/web/src/lib/host-name.ts Prettier formatting only.
apps/web/src/lib/metrics.test.ts Prettier formatting only.
apps/web/src/lib/metrics.ts Prettier formatting only.
apps/web/src/lib/status.ts Prettier formatting only.
apps/web/src/lib/utils.ts Prettier formatting only.
apps/web/src/main.tsx Prettier formatting only.
apps/web/src/services/api.ts Prettier formatting only.
apps/web/src/services/auth.service.ts Prettier formatting only.
apps/web/src/services/hosts.test.ts Prettier formatting only.
apps/web/src/services/hosts.ts Prettier formatting only.
apps/web/src/services/tokenStorage.ts Prettier formatting only.
apps/web/src/stores/auth.ts Prettier formatting only.
apps/web/src/stores/theme.ts Prettier formatting only.
apps/web/src/types/api.ts Prettier formatting only.
apps/web/src/vite-env.d.ts Prettier formatting only.
packages/protocol/.prettierrc Add Prettier config for the protocol workspace.
packages/protocol/package.json Add format script for the protocol workspace.
packages/protocol/src/agent.ts Prettier formatting only.
packages/protocol/src/envelope.ts Prettier formatting only.
packages/protocol/src/errors.ts Prettier formatting only.
packages/protocol/src/index.ts Prettier formatting only.
packages/protocol/src/logs.ts Prettier formatting only.
packages/protocol/src/metrics.ts Prettier formatting only.
packages/protocol/src/types.ts Prettier formatting only.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 23 to 26
"test": "tsc -p tsconfig.test.json",
"lint": "echo \"No lint configured yet\""
"lint": "echo \"No lint configured yet\"",
"format": "prettier --write \"src/**/*.ts\""
},
Comment thread apps/web/package.json
Comment on lines 9 to 13
"lint": "oxlint",
"preview": "vite preview",
"test": "vitest run"
"test": "vitest run",
"format": "prettier --write \"src/**/*.{ts,tsx}\""
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

apps/web has no formatter, so style drifts and diffs fill with whitespace

2 participants