feat: update column with and change api hash - #11
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the TUI certificate table’s SANs column sizing logic and improves dashboard session key derivation by separating the Flask secret_key from the API token via HMAC.
Changes:
- Adjust DataTable column handling to keep header sizing stable and explicitly size the SANs column.
- Derive Flask session signing key with HMAC(key-separation) instead of hashing the token directly.
- Add a startup check for
opensslavailability and include a VS Code task for running the app.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ssltui/tui.py | Adjusts toolbar labels and adds explicit SANs column sizing logic in the cert DataTable. |
| ssltui/api.py | Changes Flask secret_key derivation to HMAC-based key separation from the API token. |
| ssltui/main.py | Adds an openssl presence check before running commands. |
| .vscode/tasks.json | Adds a VS Code task to run ssltui via uv run. |
| .gitignore | Updates ignore rules to allow committing .vscode/ content. |
| .gitattributes | Reorders * text=auto rule placement. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1023
to
+1026
| sans_col = table.columns[self._sans_col_key] | ||
| sans_col.auto_width = False | ||
| sans_col.width = max(header_w, round(natural * 0.8)) | ||
| table._require_update_dimensions = True |
Comment on lines
1182
to
1186
| def _on_init_done(self, result: bool) -> None: | ||
| self._update_ca_status() | ||
| self._build_table() | ||
| self.refresh_bindings() | ||
| if result: | ||
| token_path = config.api_token_path(_root()) | ||
| if token_path.exists(): | ||
| self.app.push_screen( | ||
| TokenScreen(token_path.read_text().strip()), | ||
| lambda _: self.query_one("#cert-table", DataTable).focus(), | ||
| ) | ||
| return | ||
| self.query_one("#cert-table", DataTable).focus() |
Comment on lines
+115
to
+121
| if shutil.which("openssl") is None: | ||
| print( | ||
| "Error: 'openssl' was not found on PATH. " | ||
| "Please install OpenSSL and ensure it is available in your PATH.", | ||
| file=sys.stderr, | ||
| ) | ||
| sys.exit(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes