Skip to content

Rename abbreviated identifiers in hiddify core service layer for readability#5

Draft
Copilot wants to merge 1 commit into
copilot/suggest-descriptive-namesfrom
copilot/fix-typo-in-docs
Draft

Rename abbreviated identifiers in hiddify core service layer for readability#5
Copilot wants to merge 1 commit into
copilot/suggest-descriptive-namesfrom
copilot/fix-typo-in-docs

Conversation

Copilot AI commented Mar 9, 2026

Copy link
Copy Markdown

Cryptic single/two-letter names in the core gRPC service layer required deep context to understand. Replaces them with self-documenting names throughout CoreInterface, its subclasses, and HiddifyCoreService.

Renamed identifiers

CoreInterface fields & methods (propagated to all subclasses and callers):

  • fgClient / bgClientforegroundClient / backgroundClient
  • isSingleChannel()isUsingSharedChannel()
  • isActiveFg() / isActiveBg()isForegroundServiceActive() / isBackgroundServiceActive()
  • isBgClientAvailable()isBackgroundClientAvailable()

HiddifyCoreService internals:

  • listenSingle() / stopListenSingle()registerSingleStreamListener() / cancelStreamListenerByKey()
  • Parameters: cccoreClient, keylistenerKey, streamstreamFactory
  • Local vars: errMsgerrorMessage, subsubscription
  • Generic res → purpose-specific: settingsResponse, startResponse, restartResponse, selectResponse, urlTestResponse, helloResponse, tunnelResetSucceeded

Example

// Before
await startListeningLogs("fg", core.fgClient);
if (!core.isSingleChannel()) {
  await startListeningLogs("bg", core.bgClient);
}

// After
await startListeningLogs("fg", core.foregroundClient);
if (!core.isUsingSharedChannel()) {
  await startListeningLogs("bg", core.backgroundClient);
}

Pure rename — no behavioral changes.

Original prompt

Pull Request: https://github.com/iAlien369-design/hiddify-app/pull/2/files


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Fix typo in documentation files Rename abbreviated identifiers in hiddify core service layer for readability Mar 9, 2026
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.

2 participants