Skip to content

refactor(file-storage): remove unused orgFsChangeSubject export#5172

Merged
pedrofrxncx merged 1 commit into
mainfrom
refactor/org-fs-notify-dead-export-w2
Jul 24, 2026
Merged

refactor(file-storage): remove unused orgFsChangeSubject export#5172
pedrofrxncx merged 1 commit into
mainfrom
refactor/org-fs-notify-dead-export-w2

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Net code reduction found while auditing apps/api/src/file-storage/ (org-fs filesystem abstraction).

org-fs-notify.ts exports both orgFsChangeSubject (singular) and orgFsChangeSubjects (plural, added in today's #5120 apps/mesh -> apps/api split, which also introduced the dual studio/mesh subject-alias for rolling upgrades). rg across the repo (.ts/.tsx and non-TS sources) shows the singular function has zero callers outside its own test file — the one real caller, apps/api/src/api/routes/org-fs.ts, only ever imports the plural orgFsChangeSubjects. This PR deletes the dead singular export and the test cases that only existed to cover it.

Net delta: -23 / +7 lines. Behavior-preserving: the plural function and notifyOrgFsChange (its only consumer) are untouched; only the unused function and its now-redundant assertions are removed.

Reviewer command: bun test apps/api/src/file-storage/org-fs-notify.test.ts

Locally ran: bun run fmt, cd apps/api && bunx tsc --noEmit (clean), and the targeted test file above (3 pass). Full CI validates the rest.


Summary by cubic

Removed the unused orgFsChangeSubject export and its tests to standardize on orgFsChangeSubjects. No behavior change; notifyOrgFsChange continues to use the plural subjects and invalid tokens still yield an empty list.

Written for commit 0468b52. Summary will update on new commits.

Review in cubic

orgFsChangeSubjects (plural) is the only one org-fs.ts calls; the
singular orgFsChangeSubject had zero callers outside its own test.
@pedrofrxncx
pedrofrxncx enabled auto-merge (squash) July 24, 2026 14:02
@pedrofrxncx
pedrofrxncx merged commit 709ecf5 into main Jul 24, 2026
14 checks passed
@pedrofrxncx
pedrofrxncx deleted the refactor/org-fs-notify-dead-export-w2 branch July 24, 2026 14:06
decocms Bot pushed a commit that referenced this pull request Jul 24, 2026
PR: #5172 refactor(file-storage): remove unused orgFsChangeSubject export
Bump type: patch

- decocms (apps/api/package.json): 4.122.5 -> 4.122.6

Deploy-Scope: server
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