Skip to content

chore: reorganize repo code to make into domain specific directories and improve test coverage to prevent regressions - #513

Open
Colin Francis (colifran) wants to merge 13 commits into
mainfrom
colifran/repo-reorg
Open

chore: reorganize repo code to make into domain specific directories and improve test coverage to prevent regressions#513
Colin Francis (colifran) wants to merge 13 commits into
mainfrom
colifran/repo-reorg

Conversation

@colifran

@colifran Colin Francis (colifran) commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Refactor phase 1: this reorganizes the code base into more logical domain specific directories with increased code coverage. This structure will allow humans and agents to contribute more meaningfully, allow for faster reviews, and will help prevent against regressions due to higher test coverage.

Next phases will focus on splitting cli.tsx and credentials.tsx.

Repo structure

Before: 18 loose files at src/ root, flat test/ (63 of 64 files at top level), no coverage config.

Before (main):

src/
  agent/
  auth/
  connectors/
  mermaid/
  okf/
  telemetry/
  visualize/
  cli.tsx
  code-mode.ts
  commands.ts
  constants.ts
  credentials.tsx
  diagnostics.ts
  env.ts
  external-cli-auth.ts
  fs-errors.ts
  ingestion.ts
  language.ts
  onboarding.ts
  openwiki-home.ts
  schedules.ts
  startup.ts
  utils.ts
  version.ts
  windows-acl.ts
test/
  (flat: 63 of 64 files at top level)

After (this branch):

src/
  agent/
  auth/          (+ external-cli-auth)
  cli/           (cli, commands, startup)
  config/        (constants, env, openwiki-home)
  connectors/
  ingestion/     (ingestion, code-mode)
  mermaid/
  okf/
  platform/      (diagnostics, fs-errors, language, utils, windows-acl)
  scheduling/    (schedules)
  setup/         (credentials, onboarding)
  telemetry/
  visualize/
  version.ts
test/            (mirrors src/ one-to-one)
vitest.config.ts (all:true honest coverage)

Coverage

Both columns measured under this PR's all:true vitest config so they compare directly.

Metric Before After
Statements 40.09% 57.83%
Branches 34.78% 51.91%
Functions 45.88% 63.47%
Test files / tests 64 / 768 93 / 1290

Tooling

pnpm check removed and folded into pnpm test and CONTRIBUTING.md has been updated.

Testing

New unit tests to increase coverage. All existing tests pass.

@colifran Colin Francis (colifran) changed the title chore: reorganize repo code to make into domain specific directories chore: reorganize repo code to make into domain specific directories and improve test coverage Jul 28, 2026
@colifran Colin Francis (colifran) changed the title chore: reorganize repo code to make into domain specific directories and improve test coverage chore: reorganize repo code to make into domain specific directories and improve test coverage to prevent regressions Jul 29, 2026
@changeset-bot

changeset-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4be0fc1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openwiki Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

1 participant