Skip to content

chore(chat): remove the dead slash-command hold - #1786

Merged
uzairansaruzi merged 2 commits into
masterfrom
issue/1783-remove-slash-hold
Nov 20, 2026
Merged

uzairansaruzi merged 2 commits into
masterfrom
issue/1783-remove-slash-hold

Conversation

@uzairansaruzi

@uzairansaruzi uzairansaruzi commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Linked issue

Fixes #1783

What changed

The Hermes slash router still had a hold for commands waiting on #702. #702 is closed and hermesHeldNames was empty, so the .held route could never run.

This removes hermesHeldNames, both checks against it, HermesSlashRoute.held, the ChatViewModel arm with its notice (and that string's entry in Localizable.xcstrings), and the held step in docs/agents/bots.md. Every slash command routes the same as before. HermesUpdateClient's unrelated .held update offer is untouched.

How it was tested

  • scripts/test-sim <udid> --only HermesMobileTests/HermesSlashCommandTests --only HermesMobileTests/BotSlashCommandTests --only HermesMobileTests/SlashCommandTests --only HermesMobileTests/SlashCommandExecutorTests --only HermesMobileTests/ComposerSlashTriggerTests: 101 passed, 0 failed. HermesSlashCommandTests re-run after the test rename: 30 passed.
  • python3 ci/check_string_catalog.py --derived-data .build/DerivedData: covers all 3079 extracted keys.
  • python3 ci/check_comments.py, python3 ci/check_test_waits.py, python3 -m unittest discover -s ci -p 'test_*.py': pass.

This is a deletion, so it adds no test.

Checklist

  • Local validation passes using scripts/test-sim <assigned-simulator-udid> with the tests required by AGENTS.md § Verifying; the selection and results are recorded above
  • New/changed Codable models decode tolerantly (optionals for fields the server might add or rename)
  • No new third-party dependencies (the list in AGENTS.md is locked)
  • No invented API endpoints or JSON shapes (verified against upstream source or a running server)

Reviewed with sol-loop: 1 round with gpt-6.2-sol. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The slash-command router no longer has a held route. Names continue through skill lookup and resolve as text or host routes. The change also removes the related chat response, empty held-name set, localization entry, and documentation reference.

Changes: Slash-command hold removal

Layer / File(s) Summary
Remove held-command routing and references
HermesMobile/Features/Chat/*, HermesMobile/Resources/Localizable.xcstrings, HermesMobileTests/HermesSlashCommandTests.swift, docs/agents/bots.md
The router no longer defines or returns a held route. Related chat handling, the empty held-name set, localization entry, test wording, and documentation reference are removed or updated.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Refactor

Suggested reviewers: audichuang

Merge Risk: Minimal · up to 8710f

This removes unreachable slash-command hold code with no intended user-visible change. No actionable merge-blocking risk was identified.

Security architecture risk: Minimal · up to 8710f

This removes an unreachable command-handling branch. Existing command routing and bot-chat restrictions remain unchanged; no introduced security or failure-containment risk was established.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "chore(chat): remove the dead slash-command hold" matches the main change. The PR removes the unreachable hermesHeldNames set, the HermesSlashRoute.held case, its ChatViewModel arm, the loca…
Linked Issues check Passed Issue #1783 has two coding acceptance criteria. (1) hermesHeldNames and HermesSlashRoute.held no longer exist. The reviewed head versions of HermesMobile/Features/Chat/HermesSlashCommands.swift and He…
Out of Scope Changes check Passed All changes match the issue scope. They are the removal of hermesHeldNames and its checks, the HermesSlashRoute.held case, the ChatViewModel held arm and its notice string with its Localizable.xcstrin…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "chore(chat): remove the dead slash-command hold" matches the main change. The PR removes the unreachable hermesHeldNames set, the HermesSlashRoute.held case, its ChatViewModel arm, the localization string, and the docs step. The title is specific, short, and names the scope (chat) and the removed concept (dead slash-command hold). It does not mention the docs or localization cleanup, which is expected for a title.

Full details: Linked Issues check

Explanation

Issue #1783 has two coding acceptance criteria. (1) hermesHeldNames and HermesSlashRoute.held no longer exist. The reviewed head versions of HermesMobile/Features/Chat/HermesSlashCommands.swift and HermesMobile/Features/Chat/SlashCommandCatalog.swift contain no hermesHeldNames declaration, no held route case, and no held checks. HermesSlashRoute now has the cases refused, appOwned, skill, host, and text. (2) Every slash command routes as before. The removed check compared against an empty set, so it never matched. The routing logic at head therefore keeps the same behavior. The PR reports 101 passing tests across the slash-command suites, and the build compiles without a .held reference, which supports this. The ChatViewModel arm, the Localizable.xcstrings entry, and the docs/agents/bots.md step were not read directly. Their removal rests on the PR summary and the compiled test run. The HermesUpdateClient .held update offer is left unchanged, as the issue requires.

Full details: Out of Scope Changes check

Explanation

All changes match the issue scope. They are the removal of hermesHeldNames and its checks, the HermesSlashRoute.held case, the ChatViewModel held arm and its notice string with its Localizable.xcstrings entry, the held step in docs/agents/bots.md, and a test rename with an assertion change in HermesSlashCommandTests. The test change follows from removing the held exclusion and supports the same scope. The unrelated HermesUpdateClient .held offer is not changed. Files read at head show no unrelated edits. Diffs for ChatViewModel, Localizable.xcstrings, and bots.md were not readable, so their scope rests on the PR summary.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b1f53de and 8710f87.

Files selected for processing: 6

  • HermesMobile/Features/Chat/ChatViewModel.swift
  • HermesMobile/Features/Chat/HermesSlashCommands.swift
  • HermesMobile/Features/Chat/SlashCommandCatalog.swift
  • HermesMobile/Resources/Localizable.xcstrings
  • HermesMobileTests/HermesSlashCommandTests.swift
  • docs/agents/bots.md
Files with no reviewable changes: 3

  • HermesMobile/Features/Chat/ChatViewModel.swift
  • HermesMobile/Features/Chat/SlashCommandCatalog.swift
  • HermesMobile/Resources/Localizable.xcstrings

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; it removes unreachable code without changing command behavior.

Summary

Removes the unused slash-command hold without changing how commands run.

  • Hermes chat slash routing drops its unreachable held-command path.

Reviews (2) · Last reviewed commit: "test(chat): drop the hold from slash rou..." · Reviewed by Greptile

uzairansaruzi and others added 2 commits November 20, 2026 13:37
hermesHeldNames was empty, so HermesSlashRoute.held could never be reached.
Remove the set, the route, its ChatViewModel arm and string, and the bots.md step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@uzairansaruzi
uzairansaruzi changed the base branch from chore/ban-comments to master November 20, 2026 18:38
@uzairansaruzi
uzairansaruzi force-pushed the issue/1783-remove-slash-hold branch from 8710f87 to 711dc4c Compare November 20, 2026 18:38
@uzairansaruzi
uzairansaruzi merged commit ea49f89 into master Nov 20, 2026
6 checks passed
@uzairansaruzi
uzairansaruzi deleted the issue/1783-remove-slash-hold branch November 20, 2026 19:26
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.

chore(chat): remove the dead slash-command hold

1 participant