Skip to content

Conversation

@kixelated
Copy link
Collaborator

Summary

Consolidates priority constants by moving them from js/hang/src/publish/priority.ts to the catalog module (js/hang/src/catalog/priority.ts), making them centrally available and reducing import complexity across the codebase.

Key Changes

  • Created new priority.ts file in the catalog module to house priority constants
  • Updated catalog's index.ts to export the new priority module
  • Removed the publish/priority.ts module
  • Updated all imports across the codebase to reference Catalog.PRIORITY instead of importing from publish/priority
  • Changed import statements from type * as Catalog to * as Catalog in files that now need to access Catalog.PRIORITY

Files Modified

  • js/hang/src/catalog/index.ts - Added priority export
  • js/hang/src/publish/audio/encoder.ts - Updated to use Catalog.PRIORITY.audio
  • js/hang/src/publish/chat/message.ts - Updated to use Catalog.PRIORITY.chat
  • js/hang/src/publish/chat/typing.ts - Updated to use Catalog.PRIORITY.typing
  • js/hang/src/publish/location/peers.ts - Updated to use Catalog.PRIORITY.location
  • js/hang/src/publish/location/window.ts - Updated to use Catalog.PRIORITY.location
  • js/hang/src/publish/preview.ts - Updated to use Catalog.PRIORITY.preview
  • js/hang/src/publish/video/index.ts - Updated to use Catalog.PRIORITY.video
  • js/hang/src/watch/broadcast.ts - Updated to use Catalog.PRIORITY.catalog
  • js/hang/src/watch/video/source.ts - Updated to use Catalog.PRIORITY.video

Benefits

  • Centralizes priority definitions in the catalog module where they logically belong
  • Reduces circular dependency risks by removing the publish/priority module
  • Simplifies imports by having a single source of truth for priority constants

https://claude.ai/code/session_01CGDphxgmpsYeXa4ynKvjGg

The PRIORITY constants now live in the catalog module for better
organization. All consumers now import via Catalog.PRIORITY instead
of a separate import.

https://claude.ai/code/session_01CGDphxgmpsYeXa4ynKvjGg
@kixelated kixelated enabled auto-merge (squash) January 30, 2026 15:19
@kixelated kixelated merged commit 48a3c70 into main Jan 30, 2026
1 check passed
@kixelated kixelated deleted the claude/move-priority-to-catalog-qF1AE branch January 30, 2026 15:29
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.

3 participants