Skip to content

Autocomplete hook token/ID/URL fields from existing config - #1324

Open
caco3 wants to merge 3 commits into
garethgeorge:mainfrom
caco3:list-existing-notification-hook-configs
Open

Autocomplete hook token/ID/URL fields from existing config#1324
caco3 wants to merge 3 commits into
garethgeorge:mainfrom
caco3:list-existing-notification-hook-configs

Conversation

@caco3

@caco3 caco3 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Adds autocomplete for hook credential fields (bot tokens, chat IDs, webhook URLs, etc.) based on values already present in the saved config. When a user focuses a supported hook field, a dropdown appears with existing values from other hooks identical to the ones for the paths. The dropdown also includes values from other hooks in the same form that have not yet been saved, making it easier to configure multiple similar hooks in one session.

image

This PR is an approach to solve the following issues:

Notes

  • This PR is AI driven. My Go skills are very limited. But I reviewed it and tested it.
  • The implementation avoids the project's combobox component for hook fields because its state machine conflicts with the parent form's per-keystroke re-renders, which caused focus loss. Instead, a plain controlled input with a simple absolutely-positioned suggestion list is used.

@caco3 caco3 changed the title List existing notification hook configs Autocomplete hook token/ID/URL fields from existing config Jul 24, 2026
@caco3
caco3 force-pushed the list-existing-notification-hook-configs branch 2 times, most recently from da4b9fd to a279592 Compare July 26, 2026 15:26
@caco3
caco3 force-pushed the list-existing-notification-hook-configs branch 5 times, most recently from 9870081 to f3a145d Compare July 26, 2026 15:43
@caco3
caco3 marked this pull request as ready for review July 26, 2026 20:29
This was referenced Jul 26, 2026
@garethgeorge

Copy link
Copy Markdown
Owner

Hi, thanks for the interest in contributing!

Afraid for this one I'm concerned about the maintenance cost of serverside autocomplete for these fields. I think a client side only solution would be more interesting-- but I'm also wondering if this is broadly the wrong way of approaching the problem.

I think I'd like to tackle this more comprehensively at some point with a template / inheritance system allowing users to either copy and inherit configuration from other plans-- but some real thinking about the semantics of this are needed.

@caco3

caco3 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback!

I am not sure what you mean with " template / inheritance system". Could you elaborate a bit more, then I can give it a try.

As for the client side focus, how would you want to do this? At least once we would have to read the config file to extract the current values.

@caco3

caco3 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

@garethgeorge ping :)

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