Saturday, December 3, 2016

Change Log: 1.52.1194 / 2.14.79

Release 1.52.1194 focuses heavily on back-end enhancements and optimizing for efficiency and speed (e.g. on page renders).

The plan for Campaign Summary refactor milestone has so far been that I need to pay down a lot of technical debt and address a lot of long-standing issues before I get started on the features in the milestone, so this release mostly refactors the existing code base. In fact, this release contains only one new feature: a minor improvement of the Campaign Summary controls for managing Departing Survivors.

The modal controls for managing Departing Survivors have been clarified and cleaned up and now support an option for returning survivors in defeat: all of those TPK nemesis showdowns can now be recorded automatically.

That said (and I realize that this will be of almost no significance to anyone but me), this release will probably be one of the most significant ones I've done, in terms of general usability.

Not only does it totally redesign the way that requests get handled, parameters get processed and views get rendered, it also instruments a lot of what used to be total spaghetti (and is now, thanks to the extensive refactoring in this release, pretty OK-looking code) and I am already leveraging the new instrumentation in this release to work on improving usability by decreasing response times.

For example, through the elimination of redundant/extraneous code, this release will cut the time it takes to render a Campaign Summary view literally in half:



At any rate, the point of all of this is that I'll be ready to start doing feature work this weekend, I think, once I feel like I've nailed down all of the inevitable bugs/issues that get introduced in a release such as 1.52.1194.

As far as expansion coverage goes, the current plan is to roll out support for the Spidicules Expansion at some point during the feature releases for this milestone, and probably sooner rather than later.

Thanks again for using the Manager!



Corrections and Fixes

  • V1: updated assets.Survivor.modify() method ignore_keys list to stop adding the bogus "operation" key to settlements performing a Departing Survivors operation.
  • V1: removed some bogus, vestigial code in the assets.Survivor.__init__() method that was initializing the survivor's settlement every time it initialized the survivor object (!) rather than using the Settlement object already initialized on the Settlement. This should improve page render/load times quite a bit, especially for settlements with more survivors (because initializing a settlement repeatedly calls assets.Settlement.update_mins() repeatedly, and that method is a biz-logic pig).
  • V1: the settlement event logging around Departing Survivors no longer says "hunting party".
  • V1: fixed a bug where settlements with Beta Challenge Scenarios enabled would sometimes have survivor survival limit defaulted to the settlement survival limit.
  • V1: fixed a bug where users whose preference to display NO confirmation when returning Departing Survivors to the settlement caused the return operation to fail.
  • V1: addressed a Settlement Sheet presentation issue where the container that holds settlement principles didn't display correctly if it was empty.
  • V1: fixed the increment/decrement paddles for modal-content divs at wide resolution (e.g. in Settlement Storage controls, etc.) so that they're not super-tiny
  • V1: fixed a presentation issue where the event log top nav bar was transparent at mobile resolution
  • V1: fixed the buttons on the Departing Survivors controls at wide resolution so they're not...all over the place.

Improvements

  • V2: updated Models.UserAsset class to include an http_response() method that either serializes the object and returns it or throws a 404 if it can't be loaded from the MDB. Deprecated un-DRY code from api.py and the routes/ module that used to do this manually for each asset type.
  • V2: api.py has been refactored to serialize objects directly, without using code in the routes/ module.
  • V2: deprecated routes/settlement.py, since it doesn't do anything now. 
  • V1: massively refactored session.Session.set_current_settlement() to remove redundant and sloppy back-off code and to make sure we've got the best possible shot at initializing a session's attribs and keys correctly.
  • V1: moved the code for bulk survivors additions from sessions.py into the assets.Settlement class. Punched up the event logging and the admin logging (so I have better odds of catching it the next time it breaks).
  • V1: admin users' sessions are no longer removed upon failure to render current view.
  • V1: ripped the guts out of session.py and totally refactored the current_view_html() method to include a decorator called current_view_failure() that captures exceptions/failures to render the current view and handles them the way I've always wanted to handle them. Way much more better-er than wrapping stuff in individual try/excepts. Failed world HTML renders also still fail gracefully and non-disruptively. This is a pretty huge come up, all in all.
  • V1: removed some weird, vestigial/abandoned code in the new_survivor() method of sessions.Session that...must have dated back to some weird design where you could pick the settlement you wanted to add a new survivor to. Weird.
  • V1: session.Session.current_view_html() now logs (to the index.log) how long each view render takes.
  • V1: removed root directory file-printers "style.css" and "kdm-manager.js". Links in HTML and elsewhere point directly at these files in the media/ dir now.
  • V1: decorated session.Session.process_params() in a try/except type function that captures exceptions and displays the 500 screen with instructions on how to report. Updated the 500 screen to include params (if a params issue causes the 500).
  • V1: updated index to include a call to utils.record_response_times() and track total response times; updated admin.py to query the mdb for average response times per view and dump results via CLI
  • V1: revised error report emails (from within the app) to use reply-to headers for users and NOT to include their login info in the subject line
  • V1: setting the Departing Survivors' current quarry no longer reloads the Campaign Summary.
  • V1: Departing Survivor increment/decrement operations from the Campaign Summary controls for the Departing Survivors group are now logged in the settlement event log.
  • V1: removed a few extraneous/pointless calls to assets.Settlement.update_mins() from the Campaign Summary rendering method (should help render times)
  • V1: keyed in the Black Friday Lantern (under White Box/Promo)
  • V1: fixed a bug where survival max wasn't enforced on the Survivor Sheet
  • V1: implemented save() methods for Survivor and Settlement objects (to decrease typing and for future DRYness opportunities).
  • V1: keyed in a few more random survivor and settlement names (including "Deadrock").
  • V1: normalized the presentation for red box "error" panels on the Settlement Sheet and Campaign Summary (e.g for no survivors, no principles, etc.)
  • V1: re-styled the Manage Departing Survivors button to look more KD-ish and made it a fixed or absolutely positioned element at all views.
  • V1: added can_manage_departing_survivors() method to assets.User object for use in rendering the Campaign Summary controls.
  • V1: formatted the confirmation text for returning Departing Survivors
  • V1: departing Survivor controls now support victory and defeat returns
  • V1: refactored assets.Settlement.return_departing_survivors() and assets.Survivor.heal() to support victory and defeat returns.
  • V1: deprecated/removed a bunch of HTML stubs that were formerly used to build the Departing Survivors modal (which was the first of its kind, and therefore a total clusterfuck).
  • V1: redesigned the general control layout of the Departing Survivors management modal on the Campaign Summary.

No comments:

Post a Comment